Vim NERDTreeFilesysMenu: how to enable vim keybindings - vim

with the filesystem menu (default shortcut 'm') in the NERDTree plugin, you can easily add/copy/move/delete files and folders.
But the vim keybindings (h,j,k,l, w, e, b, y, v and so on) do not work in that menu.
I know there is a key-combo to enable those vim keybindings in that menu, but I have forgotten it and cannot find it again via google/forums... The shortcut is also not documented in the help menu.
Does anyone know how to enable the vim keybindings in the NERDTree FileSystem Menu?
This comes in very handy when creating large amount of files and folders with more or less the same name. I would like to copy/paste and use the vim movement keys (w, e, b, h,j,k,l) in that menu.

Ok, I've just found it myself while mashing random keys in the menu.
You can press ctrl+f in the menu, the menu will then change to another form(some sort of command history view ?!) where you can use the vim keybindings. When your input is done, press enter!

You didn't find that shortcut in the plugin's documentation because that's built-in Vim functionality: :help c_CTRL-F! The plugin uses input() to query for the file name, CTRL-F will switch to Vim's command-line window, using the input line history.
You can use the same shortcut while typing an :ex command, or while /searching!

Related

How can I use vim's key bind in the menu of NERDTree?

I'm using iTerm2, tmux, vim and NERDTree.
NERDTree GitHub
There is a problem in the menu.
When I push 'm', I can use menu mode.
In menu mode, I cannot use vim's key binding.
(I mean hjkl.)
How can I use it??
Are there plugins or shortcuts??
NERDTree implements its menu (:help NERDTreeMenu) by :echoing it to the status line and querying for keys. As indicated in its header, you can only use J / K for navigation, or you directly select an entry by pressing the (o) highlighted shortcut key (that is determined by the menu definition).
NERDTree Menu. Use j/k/enter and the shortcuts indicated
==========================================================
(o)pen through shell
> (a)dd a childnode
(m)ove the current node
(d)elete the current node
The key is obtained via this code:
:echo nr2char(getchar())
You can try this yourself; it should return the key you've pressed after its invocation. If that doesn't work, your terminal is broken (or there's a bug inside Vim).

plugin to vim that shows definition of function/macro/struct in a popup box?

Im using vim with ctag+tagbar plugin to navigate through kernel code and its amazing ! Thanks to a guide I saw here.
I read here about some nice shortcuts for ctags that helps a lot, but I couldnt find a way that a definition(of structs/function etc) would show in popup box - something like eclipse ide.
Is there a way to do so with ctag? is there a plug-in I can add to vim that would that ? so when the mouse cursor(or also keyboard cursor) on function a popup box next to it will show?
Thanks!
Generally, you should avoid trying to use Vim as an IDE. It's meant to be a modular text editor.
Having said that, if you are looking for eclipse functionality inside of Vim, you may want to consider eclim. Another good set of plugins are the Clang based tools, like clang-format and YouCompleteMe.
ctags is very useful plugin, but if you also use ctags you can then copy file http://cscope.sourceforge.net/cscope_maps.vim to your ~/.vim/plugin directory and this will add keymappings that will allow you to jump to definition or show it in horizontal or vertical split.
I also added to my cscope_maps file an extra set of mappings like so:
nmap <C-h>g :tab cs find g <C-R>=expand("<cword>")<CR><CR>
to open my search in a new tab.
Example above allows you to use Ctrl+h and then g to "find global definition(s) of the token under cursor" and open it in a new tab.
Consider using cscope- it can also work with ctags (I always use both).
I know that this is not a pop-up window, but vim is not an IDE.

Vim binding in browsers

I have been googling for a way to use vim bindings inside normal text fields in chrome. I've tried vmium and cVim but I can't figure out whether they have the functionality I'm looking for.
An example is this exact text area in which I'm typing my question. I'd like to be able to press Esc and go to vim command mode in here, and start deleting a line pressing dd.
Would that be possible? Or those plugins are just for navigation shortcuts?
Here's the answer!
Those plugins are for navigation only. If you want a Vi-like
experience in Chrome's textareas, try Wasavi. – #romainl
The cVim plugin allows for keyboard shortcuts to manipulate text inside text boxes. However, the shortcuts are not the same as vim and there are not as many. After installing the extension type ":help" to see the list of shortcuts.

How to go to any buffer directly by searching the contents of all buffers in Vim, like pressing Ctrl+P in Sublime Text?

In Sublime Text 2, when I have a bunch of files opening, I can go to any opened file by 3 following steps:
Hit <Ctrl>+P.
Enter the pattern to search for. The editor immediately display the file which match the pattern while I am typing (without hitting <Enter>).
After the right file is shown, I hit <Enter> to select the file.
How can I have similar functionality in Vim to search through all buffers/tabs? I know there are plenty of plugins which allow me to search all buffers, but they are just not as simple as the above 3 steps to go to a file. I think this feature is particularly useful in navigation.
You can either use the vim CtrlP Plugin to search through all files in your current working directory (:pwd, changed with :cd dir) or you can use the Lusty Explorer plugin to search through all open buffers in vim
With CtrlP, it you would type ctrl+p, then the file pattern, then enter (or ctrl-t to open in a new tab)
With Lusty, you would type Leader lb (leader is \ by default), type the name of the buffer you have open, and hit enter or ctrl-t

Is it possible to use vim with the mouse

Is it possible to use vim with the mouse?
If so, how?
You can enable the mouse with :set mouse=a (The letter 'a' means enable it in all modes)
With GVim, you can select text and move the cursor, and select menu options with the mouse. Copy and paste, by right-clicking etc... But I guess this misses the point of using VIM.
You can map certain actions to mouse left click and right click. And there are plenty of already mapped actions to work with ctags and other things.
:help mouse-using

Resources