####################### vimrc-basic #######################
Description: Project contains a basic .vimrc file. A basic .vimrc file to kick start your vim usage.
Settings assume you are using Tim Pope's vim-pathogen. Install pathogen: https://github.com/tpope/vim-pathogen
mv basic_vimrc_template ~/.vimrc mkdir ~/.vim-bkup mkdir ~/.vim-tmp
C-s will save document (normal, insert, or visual modes)
- when selecting documents (visual mode), selection is kept.
- stty -ixon
- put 'stty -ixon' into appropriate file In keyboard settings make capslock equal control.
- OSX ~/.profile needs 'stty -ixon' added to turn off blocking
- Linux ~/.bashrc may need 'stty -ixon' added.
C-L avoid ESC key.
short cut | vim command | description |
tj | :tabn | -- go to tab at right of current window. |
tk | :tabp | -- go to tab at left of current window. |
th | :tabfirst | -- go to first tab in tab list. |
tl | :tablast | -- go to last tab in tab list. |
F4 | :w | -- save document |
F5 | :tabp | -- previous tab same as tk shortcut |
F6 | :tabn | -- next tab same as tj shortcut |
-- move tabs around | ||
:Ztleft | -- move current window left in tab list. | |
:Ztright | -- move current window right in tab list. |
:vs | vertical split of current document (left right) split. | |
:split | split current document in middle (top bottom) | |
-- Short cuts to navigate split windows. | ||
ctrl+h | :wincmd h | -- move to view on left |
ctrl+j | :wincmd j | -- move to view below |
ctrl+k | :wincmd k | -- move to view above |
ctrl+p | :wincmd l | --move to view on right. changed to `p` b/c `C-l` is now escape. |
command | description |
---|---|
:ls | List the current buffers (including their numbers). |
:b <number> | Display the buffer with the given number. |
:b <partial> | Display the first buffer matching the partial name (or press Tab for name completion). |
:bd | Delete the current buffer; will fail if unsaved (nothing is deleted). |
:bd! | Delete the current buffer; will discard any changes (changes are lost). |
command | description |
---|---|
:Zwshrink | shrink width by 15 spaces. |
:Zwexpand | expand width by 15 spaces |
:Zhshrink | shrink height by 8 spaces |
:Zhexpand | expand height by 8 |
- F7
- :Trim
- :set spell spelllang=en_us
- :set nospell
- ]s [s navigates to misspelled words
table of contents
vim script
alphabetical function-list
categorized function-list