Joined June 2012

Alexander Berezovsky


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

Posted to Postgres common commands over 1 year ago

\e - open editor to edit your command in the pager
\x - change output format
\p - show pager content
\g - execute pager content
\g ~\path\to\file.txt - run command from the pager and save output to the file (you can set output to csv/tsv)

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

or simply fc

I think this is bad idea, check
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

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

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

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"

127 Karma
4,213 Total ProTip Views