Setting autoindent tab and shift width on vim/vi
Vim/vi is a real handy tool for updating any file on many linux destros including the favored ubuntu.
While working you might want to set the tab width [say 4 chars or whatever] along with shift size. Also how about to auto indent whenever you hit enter- all easy..
look for your vimrc – a config file for vim, it would be in
/etc/vim/vimrc
by default on ubuntu or
if you do
locate vimrc
on your terminal it would show you the path,
Then do add the following lines in it
set autoindent set shiftwidth=4 set tabstop=4
Well, you can change the the value of the tabs and shift as you want it..
happy vim’ing
See how you would solve these known algorithm problems
Java solution for checking anagram strings – tell if phrases are anagramsfind longest word in the sentence
binary tree problems with solution
Find the first occurence of number in the sorted array
Check if there are three numbers a, b, c giving a total T from array A
Implementing tokenizer and adding tokens to the linked list
Changing decimal number to its binary equivalent
Find K Complementary numbers from array Java implementation
Find the pairs that makes K Complementary in the given array java solution
Check if two strings are anagrams or not