VIM-1.6 More VIM Shortcuts and Tips


Support fuzicast.com by clicking on youtube ads and make sure to subscribe to my channel for more videos on UNIX, Perl and SQL.

facebook: facebook.com/fuzicast
twitter: @fuzicast
youtube: youtube.com/yuejdesigner85

:v/^Binary/d – delete all lines that does not start with Binary
ctrl+w gf with cursor on a filename will open that file in a new tab
gf with cursor on a filename will close current file and open that file
press * with cursor on a word will search for that word in file
vim -p file1 file2 file3 file4 # opens these files in tabs
:tabonly – closes all other tabs except current one
vimdiff – when you press ‘do’, obtain any differences from the other window. ‘dp’ will put any differences to the other window
:sort u – sort unique in vim
:sort – regular sort in vim
vim scp://username@host/PATH – open remote files
ctrl+p – autocomplete
:’t,. !awk ‘{print $3 ” ” $2 ” ” $1}’ – execute awk on current opening file
:Explore – execute, delete, rename file system easily with vim
:earlier 2h – undo up to 2hours
:later 2h – redo up to 2hours
:set spell – turn on spell check for strings within quotes
:set nospell
shift + k – with cursor on a command, press that and see man page
!% – will execute current script

Advertisements

VIM-1.5 VIM Plugin Samples and Installation


Make sure to subscribe to my channel for more videos on UNIX, Perl and SQL.
facebook: http://www.facebook.com/fuzicast
twitter: @fuzicast

Perl-Support – http://www.vim.org/scripts/script.php?script_id=556
\isu – inserts a subroutine
\cfu – inserts subroutine header
\cfr – comment frame
\rr – save and quit and run
\cc – toggles comment current line

SnipMate – http://www.vim.org/scripts/script.php?script_id=2540
snipmate cannot use set paste, comment it out

tComment – http://www.vim.org/scripts/script.php?script_id=1173
highlight + gc – toggles multiple lines
gcc – toggles single line

MRU – http://www.vim.org/scripts/script.php?script_id=521
:MRU – to see most recently used files

FuzzyFinder – http://www.vim.org/scripts/script.php?script_id=1984
Pre-req: L9 vim plugin – http://www.vim.org/scripts/script.php?script_id=3252
:FufFile – quickly find the file you want

NERDTree – http://www.vim.org/scripts/script.php?script_id=1658
:NERDTree – opens up file tree
enable mouse=a to be able to click around
? for more shortcuts, ? again to return
t – open in new tab, go to new tab
T – open in new tab
i – open in split screen
enter or o to expand directory
:Bookmark bookmarkName
B toggles list of bookmarks
q – to quit NERDTree

Matrix – http://www.vim.org/scripts/script.php?script_id=1189
:Matrix

Useful Resources:
http://net.tutsplus.com/sessions/vim-essential-plugins/
http://lug.fh-swf.de/vim/vim-perl/screenshots-en.html

https://vimeo.com/3535418

VIM-1.4 VIM Configuration and Color Scheme


Make sure to subscribe to my channel for more videos on UNIX, Perl and SQL.
facebook: http://www.facebook.com/fuzicast
twitter: @fuzicast

You can download VIM-1.4.tar from http://www.2shared.com/file/ma0cGnZx/vim-14.html

filetype plugin on
set t_Co=256
colorscheme mustang
syntax on
set hlsearch
set incsearch
set mouse=a
set wildmenu
set list
set unlist
set number
set autoindent
set ts=4
set ignorecase
set title
set nowrap
set scrolloff=5
set paste
set cursorline
set shiftwidth=4
map :tabnew
map gt
map :PREVCOLOR
map :NEXTCOLOR

VIM-1.3 More VIM Editor Commands Tutorial


Make sure to subscribe to my channel for more videos on UNIX, Perl and SQL.
facebook: http://www.facebook.com/fuzicast
twitter: @fuzicast

:tabdo %s/pattern/replacement/g – execute commands on all open tabs
:command1 | command2 – run multiple commands
:help
vim file1 file2 file3 – open multiple files
:n – go to next file
:only – when in split screen, close all other screens and keep current screen
. – repeats last action
:g/pattern/ – returns you all the lines that contains the pattern
:g/pattern/d – delete all lines that contains this pattern
:v/pattern/ – return all lines that don’t contain this pattern
:v/pattern/d – delete all lines that don’t contain this pattern
ctrl + o – the same as ‘.
: + up/down key – view history of : commands
/ + up/down key – view history of / searches
ctrl + w + (hyphen) – maximize the windows
ctrl + w + = – restore original windows
== – aligns line to same position as previous line
select block; :fold – compress lines, zo to expand, zc to compress again
:%s/pattern/replacement/gc – search and replace
ctrl + v ctrl + m – get special characters
:%d
:diffget – sync current screen with the other screen
]c – get to next diff

Collection of Color Schemes for VIM Editor (256-color compatible)


Awesome colors, Awesome schemes

http://hcalves.deviantart.com/art/Mustang-Vim-Colorscheme-98974484

http://www.vim.org/scripts/script.php?script_id=2140

http://www.vim.org/scripts/script.php?script_id=3520

http://gergap.wordpress.com/2009/06/01/new-vim-color-scheme-wombat256/

http://www.h3rald.com/articles/herald-vim-color-scheme/

http://juan.boxfi.com/vim-color-schemes/

http://noahfrederick.com/vim-color-scheme-hemisu/