vim shorties

I made up a list of vim commands I use , I wrote down the list but did not sort them out.

Also an Advanced Vim Tutorial can be found here written by smr , his homepage @T smr.co.in .

Also the list can be found @T http://students.iiit.ac.in/~sairam/tutorial/Vim.txt .

vim Shortcuts &| Small Codes
———————————————

h->left
j->down
k->up
l->right
k
h    l
j

Ctrl+N &| Ctrl+P for word Completion

:s/old/new/ for replacing in that line only,

:%s/old/new/g for replacing in the whole text.

:23,84s/old/new/ for replacing the text from lines 23 to 84.

:vsplit | :vs for vertical splitting,

:split for splitting horizontally,

:!cmd to execute a bash command.

Ctrl+G to show the file status.

Ctrl+[ for Escape mode.

i for insert mode.

I for insert mode, but changing the cursor to the start of the line.

R for Replace mode.

Ins for Insert/Replace Mode.

/searchword for searching from top to bottom

?searchword for searching from bottom to top

n for next match of the string

N for previous match of the string

/searchword\c for case-insensitivity.

:w to save

:q to quit

😡 == :wq = ZZ to save and quit.

:X for encrypting in vim and only vim can decrypt it.

$ -> End of line,

^ -> Start of line,

+ -> for going a line down,

– -> for going a line up.

G -> for going to the end of file,

gg -> for going to the start of file,

:23 | 23G -> goes to the 23rd Line,

yy -> yanking,

dd-> deleting,

p -> paste below the current line.

P-> paste above the current line,

J -> to join this line and the next line,

% @ } or { or ) or ( for finding their partner,

O -> insert a line above the present line,

0-> insert a line below the present line,

~ -> for changing the case of a letter.

cw-> delete from cursor position to end of word.

C-> Change to end of line.

cc -> delete from cursor position to the end of the line.

:a -> to apply a function|command to all its windows,

a -> start editing after the curr position of the cursor.

:r filename -> prints the file withe name filename at the curr cursor position.

u -> undo

Ctrl+R ->Redo

Ctrl+e to scroll down withe cursor position fixed until it is in view.

Ctrl+y to scroll up withe cursor position fixed until it is in view.

Ctrl+d to scroll down half a page

Ctrl+u to scroll up half a page.

Ctrl+f to scroll down a page,

Ctrl+B to scroll upwards a page,

V -> to select an area horizontally & vertically and apply some function on it.

Ctrl+V to select area vertically & horizontally and apply a function on it,

x-> delete charecter under cursor,

X-> delete charecter before cursor,

d$ -> delete till end of line,

5dw -> delete 5 words.

<no>command -> execute it <no> times,

Ctrl+w + Ctrl+w -> to shift between windows in splitted conditions,

Ctrl+w + Ctrl+r -> to reverse the positions of the windows,

Ctrl+w + Direction Key to go to that window.

Ctrl+w + Ctrl+q -> to quit that window.

* on a word searches for all occurances of that particular word.

Ctrl+y in a line to copy charecters from the above line.

H-> goto top of screen,

L -> goto bottom of screen,

rx-> replace charecter with x

A -> Start Inserting @T end of line.

:f filename -> change current file to filename

” vim: fdm=marker fdl=0 –> @T the end of a vim file applies these settings to that file. It folds with folding marker.

blogging again

Thought it was the time to start blog again, and so started over again, a fresh blog here @T  https://sairamkunala.wordpress.com. Its like starting a fresh life again on the internet, and directly entering into the bl0gg€r$’ w0rld.

Thought of writing about Vim 7.0 release can be found @T http://vim.sf.net.

I think this time, I will hold on to this blog, and writeup p0$t$.