Improve speed and comfort when writing shell scripts. There are many additional hints and options which can Syntax checking, running a script, starting a debugger can be done This is done by inserting complete statements, comments, idioms, and code I find it most usable in gVim where it offers a comprehensive set of menus which you can see in the example.įrom the Help text: It is written to considerably speed up writing code in a consistent style. This one provides a Bash scripting IDE for Vim and gVim. To achieve this I have the following in my ~/.vimrc " NERDTree settings (only in GUI mode) I prefer to use NERDTree in gVim and not in Vim. Type :h NERD_tree for the large and comprehensive help file. In case you're interested, the colour theme I use in gVim is "Murphy". A tree is displayed in a window which can be scrolled and traversed to find files to edit. A particular directory is opened by typing :NERDTree somedir. This plugin provides a file browser within Vim/gVim. If you have never made enhancements to this editor, here's a site with a very good tutorial on how to install plugins. In these notes I have listed some of the plugins I use to enhance Vim and gVim's functionality. I don't remember when I changed to Vim, but for many years I have used it (actually gVim) as an IDE (Integrated Development Environment), particularly for writing Bash and Perl scripts. Learning Emacs didn't seem like a good choice since it wasn't usually available on the systems I was administering.
In those days you could usually count on a system having vi (or at a pinch, when the system would only boot into single user mode, ed). I started learning vi a long time ago when I first encountered Unix systems. In the examples, I used a different highlighting group as in the main article.Summary: Some of the Vim/gVim plugins I use and would like to recommend :nnoremap c :exe "let m=matchadd('WildMenu','\\')"Īnd finally, one can clear the permanent highlights (mapped to \Enter): To highlight the words contained in the virtual column (mapped to \c): :nnoremap w :exe "let m=matchadd('WildMenu','\\')" Or one could only highlight the word underneath the cursor (mapped to key \w): :nnoremap l :exe "let m = matchadd('WildMenu','\\%". It is possible to highlight the entire line permanently (mapped to key \l):
To achieve this result on older Vim versions, you could combine the idea in the first method with a CursorHold or a CursorMoved autocmd. If you only want the highlight applied in the current window, use an autocmd instead:Īu VimEnter,WinEnter,BufWinEnter * setlocal cursorline That makes it easy to locate the cursor after scrolling in a large file. With the default backslash leader key, typing \c will toggle highlighting on and off. :nnoremap c :set cursorline! cursorcolumn! :hi CursorColumn cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white :hi CursorLine cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white The following example shows how to change the highlight colors and how to create a mapping to toggle cursorline (to highlight the current line) and cursorcolumn (to highlight the current column):
Simply putting :set cursorline in your vimrc will highlight the current line in every window and update the highlight as the cursor moves.