is there a faster way to perform spell checking in atom? - atom-editor

right now i have to highlight the word that is underlined as misspelled, then double click it, then choose correct spelling, then choose the right word.
i am tired just writing all these steps,
any idea how to get this done faster?
I use vim plugin, so PLUS 1 for any solution that will let me avoid the trackpad/mouse.

By default, the keyboard shortcut cmd-shift-: (ctrl-shift-: on Windows) will quickly bring up a list of corrections when your cursor is on a misspelled word.

With the 1.11.0-beta5 version of Atom, I had to register the spell-check keyboard shortcuts myself.
I put the following in my keymap.cson (Edit -> Keymap):
'.platform-darwin atom-text-editor':
'cmd-:': 'spell-check:correct-misspelling'
'.platform-darwin .corrections atom-text-editor':
'cmd-:': 'core:cancel'
'.platform-win32 atom-text-editor':
'ctrl-:': 'spell-check:correct-misspelling'
'.platform-win32 .corrections atom-text-editor':
'ctrl-:': 'core:cancel'
'.platform-linux atom-text-editor':
'ctrl-:': 'spell-check:correct-misspelling'
'.platform-linux .corrections atom-text-editor':
'ctrl-:': 'core:cancel'
'.corrections atom-text-editor[mini]':
'enter': 'core:confirm'
'tab': 'core:confirm'
Source: https://github.com/atom/spell-check/blob/master/keymaps/spell-check.cson

Related

Which keybind for smart-searching in history with ZSH?

When using the up and down arrow in my terminal (iTerm 2 on Mac OS Catalina), I can browse through my last commands using the up and down arrows.
I use ZSH (Oh-my-zsh to be precise) and if I type e.g. vim then press up, it will browse my history for any commands issued starting with vim.
I think it's annoying to have to move my hand to the arrow keys, so i wanted to bind ctrl-j and ctrl-k for browsing up and down.
I looked at bindkey and bound ^j to down-history and ^k to up-history. This allows me to browse my history, but not with the "smart" functionality (i'm not sure of the right terminology here) - It simply goes up and down in my history, without regards to my input.
I've looked through the standard widgets on the Zsh Line Editor manual, but I cannot find the right command for this.
Which command should I bind ^j and ^k to to get my desired result?
After some further digging, i ended up on the The Z-Shell Line Editor page at the section called "Prefix searching".
It revealed that the widget I was after, is called history-beginning-search-backward.
When using that widget, it works almost as I wanted it to, but not jumping to the end of the line.
A quick search lead me to another StackOverflow Question, that states that if you want to jump to the end of the line (as with the up arrow), it should be done as follows;
I had the same question and managed to find the solution with some experimentation.
I added the following to my .inputrc
"\eOA": history-search-backward # Up
"\eOB": history-search-forward # Down
"\C-P": "\eOA\C-E" # Ctrl-P
"\C-N": "\eOB\C-E" # Ctrl-N
This binds two hotkeys to Ctrl-P and Ctrl-N. One for history search, and the other Ctrl-E for end-of-line.

Keyboard shortcut to convert selection to capitalized case in the atom editor

What is the keyboard shortcut to convert the currently selected text to capitalized case in the Atom editor?
For example. If I was to select brown fox and I would hit the keyboard shortcut I'm looking for, it would become Brown Fox.
I know Cmd/Ctrl + K + U/L exists for converting to uppercase and lowercase. I hope for something like Cmd/Ctrl + K + C to exist.
Related: Keyboard shortcut to convert selection to uppercase (or lowercase) in the atom editor
I was looking for the same thing and found this package: https://atom.io/packages/change-case
After installing it, I opened the config editor (there's a button in the package manager). Then in .atom>packages>change-case>keymaps>change-case.cson I changed the file from:
'.platform-darwin atom-workspace':
'cmd-k cmd-c': 'change-case:camel'
'cmd-k cmd-s': 'change-case:snake'
'.platform-win32 atom-workspace':
'ctrl-k ctrl-c': 'change-case:camel'
'ctrl-k ctrl-s': 'change-case:snake'
To this:
'.platform-darwin atom-workspace':
'cmd-k cmd-c': 'change-case:camel'
'cmd-k cmd-s': 'change-case:snake'
'cmd-k cmd-t': 'change-case:title'
'.platform-win32 atom-workspace':
'ctrl-k ctrl-c': 'change-case:camel'
'ctrl-k ctrl-s': 'change-case:snake'
'ctrl-k ctrl-t': 'change-case:title'
After saving the file, close Atom & restart ... worked a treat

create multicursor in Atom

I use Atom on Ubuntu 17.10 with wayland window manager.
I can create multiple cursors with CTRL+Mousclick or with CTRL+d to select the next same string.
But how can I for example mark some lines and create a cursor at the start of each line?
Also would be great to use search and find-all to select lots of results in a text to create a cursor at all these results.
I used this workaround at the moment by selecting the line-break and use CTRL+d to select the next linebreaks too with extra cursors, then go one left and Pos1 to have the cursors at the start of each line.
I wanted to select a string that repeats about 200 times in a dataset of 3000 text-blocks in a bunch of output and then I wanted to expand the selection to each of those blocks. That would have been really easy with multiple cursors. I solved this another way now, but for the next time I would like to see a complete instruction manual about how to create multiple cursors in the standard atom setting. I couldn't find this. Search-engines give me lots of plugins and solutions in different multicursor plugins.
I found the manual that explains it like in sublime (ctrl alt up and down):
Alt+Shift+Up and Down
see: https://flight-manual.atom.io/using-atom/sections/editing-and-deleting-text/#multiple-cursors-and-selections
What is missing in the manual is also a useful option:
use "find all" with the search tool in Atom (CTRL+F)
press Alt + Enter to create cursors at all the found locations.
see: https://discuss.atom.io/t/how-do-i-create-multiple-cursors-from-search-result/53231/5
I wanted to make it easy so I could just use alt+⬇️ or alt+⬆️ to have multiple cursors. This was my solution and I think its the easiest:
# From Atom -> Keymap add the following lines:
'.editor':
'alt-up': 'editor:add-selection-above'
'alt-down': 'editor:add-selection-below'

Atom editor - alt + tab?! Is it working?

I have a problem with the shortcut settings in Atom (Ubuntu 16.04). I'm looking for an option of switching between the tabs using "alt + tab". Somewhere I saw an info that it's already "packed in" but it's not true. So I've been told that I have to change the Keymap. I did it a couple of times using different instructions for example:
'body':
ctrl-tab ^ctrl': 'unset!'
'ctrl-tab': 'pane:show-next-item'
'ctrl-shift-tab ^ctrl': 'unset!'
'ctrl-shift-tab': 'pane:show-previous-item'
but it failed...I mean - it is working only as long as the tab with the Keymap is open!?! (I've saved it of course before closing!)
and it is not working when I use the tab option "Split left, right or down" to get double or more views at one time.
Does anyone from You know how to solve this?
Thanks in advance!
Paweł

What is the shortcut to format code in Qt Creator?

I want to format my Qt code via a shortcut in Qt Creator, just like ctrl + shift + F in Eclipse.
But didn't found one in Qt creator options, nor after searching via google.
So, do there has such a shortcut in Qt Creator? If no, then how to format code?
You can at least indent your code in the following way. First, select the portion of code you want to indent (or Ctrl + A, if you want to indent all source code in the current file) and then Ctrl + i.
If you're on a Mac OS X, use Command instead of Ctrl.
First, install clang-format.
If you're on Ubuntu, you can do it with sudo apt-get install clang-format.
Then go to Help -> About plugins, and check Beautifier.
Then restart Qt creator.
Now, go to Tools -> Options -> Environment -> Keyboard and find where it says "Format Current File" in the middle column, then click on it.
And at the bottom of this window click on record, and record the key sequence that you would like to use to format the current file.

Resources