Joined June 2012
·
a-b

Alexander Berezovsky

SF
·
·
·

Try docker rmi $(docker images -f "dangling=true" -q) to remove unnamed images

Posted to Format JSON in vim over 1 year ago

how do I set indent size = 2 spaces instead of 4 ?

Posted to The single most useful thing in bash over 1 year ago

you can get even more power with zsh zle http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html

or simply fc

I think this is bad idea, check https://github.com/Lokaltog/vim-easymotion
Also check basic vim navigation:
Ctrl - u half screen up
Ctrl - d half screen down
Ctrl - f screen up
Ctrl - b screen down

2h and 2l - total bizarre you should learn vim text objects and jump by word, sentence, paragraph etc...

Posted to log navigation with `less` over 1 year ago

yah man + basic knowledge of vim - helps a lot

Posted to Bang Cash (!$) over 1 year ago

Also this tip looks very similar to https://coderwall.com/p/ttvo9g

Posted to Bang Cash (!$) over 1 year ago

With ZSH you can do more, as usual. For instance select range of params ;)

$ echo p1 p2 p3
p1 p2 p3
$ echo !:2-3
$ echo p2 p3
p2 p3

Also you can do searches and other cool stuff read more http://www.cs.elte.hu/zsh-manual/zsh_6.html#SEC29

Posted to Managing letter case in vim over 1 year ago

please don't forget: you can apply letter case alternation for text selected in visual mode. All commands ~ , u , U

Posted to VIM Syntax Highlighting over 1 year ago

actually you can do something like

echo "syntax on" >> ~/.vimrc

meantime I would suggest to use vim-janus

this is very bad smell, to move around in INS mode. Whole concept of vim to do all motions in normal mode, and think about text as an objects: char, word, sentence, paragraph, block..

My guess this tip is very similar to https://coderwall.com/p/n1abyq

Actually you can also use use -O and -p params. Let's check man vim:

-o[N]       Open N windows stacked.  When N is omitted, open one window for each file.
-O[N]       Open N windows side by side.  When N is omitted, open one window for each file.
-p[N]       Open N tab pages.  When N is omitted, open one tab page for each file.
Posted to Vim Command Line Tips over 1 year ago

regarding tip #5
you can use vim - to read stdout so all script output could be collected
./my_script blah | vim -
or even more advanced
echo "foo\nbar" | vim - +"%s/bar/abc/g | 2"

Achievements
127 Karma
5,152 Total ProTip Views