Wednesday, July 23, 2014

Vim Vim

I am not a fan of old school Editors, but VIM is very powerful and useful specially when you are trapped in console/command line without graphical user interface.
Use CTAGS and CSCOPE along with VIM to make the best use of it!

CTAGS: ctags -R * [To go to the definition, use "Ctrl-]", to go back to stack "Ctrl-t"]
CSCOPE:  cscope -R * [Type "Ctrl-\s" to trace the call, to go back use  Type "Ctrl-t"]

Find more at:
http://courses.cs.washington.edu/courses/cse451/10au/tutorials/tutorial_ctags.html
http://cscope.sourceforge.net/cscope_vim_tutorial.html

Monday, July 21, 2014

Linux Tips

Linux Tips!

How could I not ever noticed this! Before this, I was manually installing all the dependencies, grrrr x-(
You can fix install dependencies with the following command:

sudo apt-get -f install

Did you ever need to sort by directory size? Use this!

                                 du -h --max-depth=1 . | sort -n -r

Use -- for grep to search symbols!
                grep -- "-C" abc.txt