VIM
remove blanck space on begin line
:le
Make a match-all regex un-greedy
Instead of .*
use .\{-}
Make sure there are no white space's when pasting into vim.
:set paste
Disable visial select
set mouse=a
Use for loop and range to create a list
:for i in range(1,10) | put ='192.168.0.'.i | endfor
:for i in range(21,38) | put ='client-server-' .i | endfor
diff two buffers
:diffthis (in both buffers)
:diffupdate
use grouping in replace
% s/\(^.*,[a-z]\{12\}\).*$/\1/g
readable json. Or how to execute a command on the buffer
:%!python -m json.tool
Using Matching for the line selection.
The following will remove #
at beginnng of the line after the line matching ## Netherlands
/## Netherlands/,/^\n/ s/^#//g
Fix unreadable vimdiff
put the following in ~/.vimrc Keep in mind that sudo vim uses the vimrc of root
highlight DiffAdd cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
highlight DiffDelete cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
highlight DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
highlight DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red