Is there a command available to key mapping for toggling the display of invisibles in the Atom editor. A Show/Hide Invisibles command?
Where would I go to look for such a command?
YES
For Linux and Windows:
1) hit Ctrl+Shift+P and type keymap
2) select Application: open your keymap and add the following 2 lines to that file:
'body':
'shift-ctrl-i': 'window:toggle-invisibles'
Or any non-conflicting keystroke combination of your liking instead of shift-ctrl-i.
Note
For further detail, read documentation on CSON fromat (season) and atom-editor's implementaton of cson.
You can open the Command Palette (Cmd + Shift + P) and search for the Window: Toggle Invisibles command. Selecting that command should toggle invisibles on/off.
Here's what worked for me using the Mac version:
'.editor':
'ctrl-i': 'window:toggle-invisibles'
For Atom 1.58.0 on Mac, open Settings, Keybindings, and click on the 'your keymap file' link above the search box. Add the following two lines to the bottom of the file and save it:
'atom-text-editor':
'ctrl-i': 'window:toggle-invisibles'
Pressing Ctrl and i will then toggle on and off the invisible characters
Related
I want to be able to turn certain extensions on and off with a keyboard shortcut. But didn't found out how to do keybindings for extension activation
Specifically I wanna do this for VSCodeVim. So that I can use it more often and become more used to using Vi
To toggle Vim mode in Vscode do the following:
Use 'CTRl+Shift+P' to open vscode command palette
type 'vim toggle', you will see 'Vim: Toggle Vim Mode' option
select it and press enter to toggle vim mode.
To add keybinding (shortcut) for toggling :
open command palette using 'Ctrl+shift+p'
type 'shortcuts'
select 'Preferences: Open Keyboard Shortcuts' and press enter
search 'toggleVim'
click on 'Keybinding' column
press the buttons you want for the shortcut and press enter
Not every extension can be disabled by this method, But all extensions can be disabled or enabled for a particular workspace.
Using the VIM extension for VS Code is there a key command to jump to the explorer pane and then back to the work window?
I cannot find anything in the docs.
I'm hoping there is something like my Control+N binding for NERDTree which lets me open the file viewer, pick a file and then close it.
I am not familiar with NERDTree, but I think Ctrl+Shift+e does what you are asking in vs code. Alternatively Ctrl+p may be an alternative? You could look at
linux keyboard shortcut for more reference.
The link is also available in Help > Keyboard Shortcut Reference
EDIT: I'm adding the equivalent shortcut for Mac OS since it's different layout. However, I don't use Mac OS.. So I add this without being able to confirm :
Shift+Command+E
Mac OS Keyboard shortcut for VS Code
Windows keyboard shortcuts are very similar to linux ones. So, I'll just include the link to windows shortcuts doc here. Windows Keyboard shortcut for VS Code
Just my two cents:
If you are using the Vim extension for VS code you can add this to your settings.json file:
"vim.normalModeKeyBindings": [
{
"before" : ["<leader>","a"],
"commands" : [
"workbench.view.explorer"
]
}
]
The exemple above uses <leader> + a while in normal mode to display the file explorer where you can navigate the file list with j and k. Pressing ENTER will open the file under the cursor and close the file list.
To set up a leader key just add in your settings.json:
"vim.leader" : "," ,
In addition to Santiago's comment, you're able to open a file in a new tab from the explorer (Cmd + Shift + E) with Ctrl + Enter for MacOS. I'm not sure about Windows or Linux.
If you want to go to a file with VIM in VSCode:
Enter Normal Mode (Esc)
Place cursor over file you want to jump to, e.g. between the quotes - "../models/postMessage.js";
Press lowercase gd - Go to definition
I have installed IntelliJIdea 14.0.2 just now. I do not know its default editor but it is opening my source files in vi option now. So, not letting me do default action like Ctrl + v, Ctrl + d which was present before and I used to like it.
So, how to change this behavior like present in sublime - editors?
disable below option in menu bar.
Tools -> VimEmulator(Ctrl + Alt + V)
If you don't need vi keybindings, uninstall the IdeaVIM plugin.
If you don't want to uninstall vi, you can either turn it off, like #redredtokki states (Tools > VimEmulator), or
Change the Ctrl-X and Ctrl-V keys in File > Settings
under: Editor > Vim Emulation:
Change the column on the right from "Vim" to "IDE".
If you wanna use vim and also shortcuts like Ctrl+C/Ctrl+V/Ctrl+X, you may redefine the shortcuts as IDE shortcuts in:
File-->Settings-->Other Settings-->Vim Emulator
I intend to copy something from vim editor to shell command line. I have tried many ways, but I find all of them only work when in the same vim editor. My need is to copy and paste between vim editor and shell command line. That's, vim -> shell
PS: I am using putty.
EDIT:
BTW, what if just copy something from vim editor and paste it to terminal both in a unix/linux box?
ATTENTION:
output of :echo has("X11") in vim is 0, so my system does not support X11!
If your vim version >= 7.3.74, you can set the vim to use the system clipboard by default by adding a line to your .vimrc:
set clipboard=unnamedplus
for the detail, see this link. Then you use the y(ank) command in vim, the content is in the system clipboard.
EDIT:
this solution and the "*y solution require the Vim that has clipboard support. Since you're lack of that, use cat/grep/less/tail... to extract the text you want to copy.
" + y to yank text in vim, then ctrl + shift + v to paste in the terminal.
from the comments, it seems that your mouse middle button works for * buffer, you can select text in vim, then press: 3 keystrokes:
"*y
and switch to other program, terminal, browser or whatever, click mouse middle to get yanked text.
read :h y for details, how to yank text and save in a specific register (in this case, it is register *)
Using pipe
Select line[s] by using V command then execute this selection by command :'<,'>w !sh
How to do a text search into a cygwin window buffer ? Is there a way to make the same kind of text seach as in Windows console buffer (right-click > search) ?
(I use mintty)
In mintty, you can do that using the sequence Alt+F3.
More information in the mintty man page
Searching in the text and scrollback buffer
Alt-F3 opens a search bar with an input field for a search string. Matches are highlighted in the scrollback buffer. Enter/Shift+Enter find the next/previous position of the match and scrolls the scrollback buffer accordingly. The appearance of the search bar and the matching highlight colours can be customized.
Beware this sequence is very close to the infamous windows sequence that closes a window. (which uses F4)
Alternatively, you can enable the Ctrl+Shift+H shortcut by going into the options pane of mintty and enabling Ctrl+Shift+letters shortcuts in the Key section of the options.
You access the options pane by right-clicking the mintty icon of the mintty window (upper left corner)
There's no such function currently. The closest alternative is to 'Select All' (followed by 'Copy' if you've disabled copy-on-select), paste into a text editor, and search there.
You have a few options.
Use cmd | tee file, then search in the resulting file afterwards.
Use screen's copy/scrollback mode.
(Mintty) I'd mucked up an rsync command (wrong direction) so I wanted to track which files had been altered. So I manually selected the Mintty screen output from the bottom with my mouse hold left mouse button and then push to top of the screen and then tediously waited while the screen scrolled forever backwards then when I'd gone back as far as I needed I did a Control-Insert to copy. I then pasted into a text file which I could then search, edit, grep, vim to my hearts content. Don't know if this the only way but it works!
I used emacs editor as buffer. From emacs open shell : C-x shell, then I can do search within buffer as current window.