Start - Make Vim as Your Bash-IDE Using bash-support Plugin - Pentadactyl. This post is written by SathiyaMoorthy.
This article is part of the ongoing Vi / Vim Tips and Tricks Series. As a Linux sysadmin or programmer, you may do following repetitive tasks while coding bash shell script: Adding file header Adding function/frame comment Including default code snippet Performing syntax check Reading documentation about a function Converting a code block to comment, and vice versa The bash-Support Vim plugin offers easiest way to do all of the above, saving lot of time and keystrokes. Start - Have Intellisense search current directory - Vim Tips Wiki - Pentadactyl. This tip is relevant to those who use the "Intellisense" functionality for vim ( for C++.
This requires, as a part of its setup, that the paths for all the included header files in a C++ file be present in the $INCLUDE variable. This is fine so long as all your header files are in one (invariant) location (say the MSVC's include directory). However, if your C++ file includes header files in locations relative to the current file, updating the INCLUDE environment variable is not an option. Start - Omni completion - Vim Tips Wiki - Pentadactyl. Omni completion provides smart autocompletion for programs.
When invoked, the text before the cursor is inspected to guess what might follow. A popup menu offers word completion choices that may include struct and class members, system functions, and more. Start - Su-write - Vim Tips Wiki - Pentadactyl. Sometimes you modify a file, for example from the /etc directory, then when you try to save the file, you get a permission-denied error.
This tip presents some suggestions for using sudo from with Vim, so you can successfullly write the file with temporary privileges. Of course, this tip has to be used with caution, as it gets you more power. Suggestion 1 Edit.