, you'll wind up in the hidden directory. Although note that with this method, if you cd somewhere and then cd. Then set CDPATH to include the path to that hidden directory. When in a normal buffer, it opens the directory containing the file. Another key idea is that I use Tmux everyday and I like to have an unified set of mappings, beside the leader/prefix key. This is by no means a reference card, and yes I do use the arrow keys for navigating into my buffers. nnoremap - :e :h When in a fugitive buffer, this opens the tree of the directory above the current one. Here are the current Neovim mappings I came to feel comfortable with over time.I find -to be the most intuitive, so it works the same as NetRW. It could also contain links to any other directories you frequently visit. This is vim It is whatever shortcut you want. Type the contents of file and get into command mode (Press Esc ) :tabedit file2, will open a new tab and take you to edit file2. In ~/.bashrc, and then typing cd somewhere would take you to /user/something/somefolders/somewhere (assuming there's no directory named somewhere within the current directory).Īlternatively, if you don't want to refer to the folder somewhere by its real name, you could create a hidden directory that contains a symbolic link to /user/something/somefolders/somewhere with the name you want to use. Steps: Open Vim with any file or just Vim: vim file1. In your case, you can set export CDPATH=.:/user/something/somefolders This is a colon-separated list of directories in which the shell looks for destination directories specified by the cd command. I want to open a file in Vim like in Eclipse using Ctrl + Shift + R, or via the Ctrl + N option of autofill. You can use the environment variable CDPATH for this.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |