My approach is to use WebStorm and the other JetBrains products to get good language support, and IdeaVim to increase my general coding and typing efficiency.
This is a great feature : Mapping IDEA Actions to VIM shortcuts.
These are the Vim-commands I find most useful (except for a few that are merely interesting like g??).
In IdeaVim some of the commands, like :r, :e and :b? do not work as in the original Vim, yet.
If you find errors or grave and omissions, please let me know : @andreasoverland
I have included my .vimrc and .ideavimrc in the bottom
Resources for beginning Vim users:
Follow me on Twitter : @andreasoverland
.gz
logs without unpacking.
Pro tip: Use -E
for multiple patterns (zgrep -iE "error|warn" ...
).
zcat file.gz | wc -l
to count lines quickly.
rg -uu
to include hidden/ignored files.
.gitignore
by default.
-23
= in A not B; -13
= in B not A.
csplit
to split by regex.
-0
with find -print0
for safety.
--env _
to export environment vars.
-pterb
for richer stats.
-d
highlights changes.
+L1
finds deleted-but-open files.
-e trace=file
focuses on file I/O.
nc -l 1234
to listen and transfer files.
dig +trace example.com
shows full delegation path.
-I
for headers; -d @file.json
for POST.
--partial --progress
for big files.
-r
outputs raw strings.
-i.bak 's/foo/bar/g'
edits in place with backup.
-F'\t'
for TSV.
sponge
(from moreutils) soaks up input then writes.
Pro tip: avoids truncation.
xxd -r
reverses back to binary.
-I 'node_modules|dist'
to ignore patterns.
set nocompatible filetype off filetype plugin indent on syntax enable let mapleader = " " set ignorecase set ruler set autoindent set incsearch set encoding=utf-8 set noexpandtab set tabstop=4 " tab size is 4 set number " always show line number set nostartofline set clipboard^=unnamed,unnamedplus set showcmd set showmode set path+=** set nowrap set noswapfile set nobackup set noerrorbells set nu rnu noremap <Up> <NOP> noremap <Down> <NOP> noremap <Left> <NOP> noremap <Right> <NOP> inoremap jj <Esc> xnoremap u <nop> "Mode Settings let &t_SI.="\e[1 q" "SI = INSERT mode let &t_SR.="\e[3 q" "SR = REPLACE mode let &t_EI.="\e[2 q" "EI = NORMAL mode (ELSE) "Cursor settings: " 1 -> blinking block " 2 -> solid block " 3 -> blinking underscore " 4 -> solid underscore " 5 -> blinking vertical bar " 6 -> solid vertical bar
source .vimrc set clipboard+=unnamed set surround set multiple-cursors set ideajoin set surround " Lets you surround with motion : ysiw" would sourround a word with " set sneak " Great plugin for two letter multiline search set number set relativenumber let mapleader = " " imap jj <Esc> nnoremap <C-k> :m -2<CR> nnoremap <C-j> :m +1<CR> xnoremap u <nop> nmap <leader>t :action ActivateTerminalToolWindow<CR> nnoremap <leader>r :action RenameElement<CR> nnoremap <leader>d :action Debug<CR> nnoremap <leader>si :source ~/.ideavimrc<CR> nnoremap <leader>M :action ToggleBookmarkWithMnemonic<CR> nnoremap <leader>m :action ShowBookmarks<CR>