Prasanna Says

Saturday, February 2, 2008

VIM Quick Reference

Basic movement
h l k j . . . . . . . . . . . . character left, right; line up, down
b w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . word/token left, right
ge e . . . . . . . . . . . . . . . . . . . . . end of word/token left, right
{ } . . . . . . . . . . . . . beginning of previous, next paragraph
( ). . . . . . . . . . . . . . .beginning of previous, next sentence
0 gm . . . . . . . . . . . . . . . . . . . . . . . . . beginning, middle of line
^ $ . . . . . . . . . . . . . . . . . . . . . . . . . first, last character of line
nG ngg . . . . . . . . . . . . . . . . . . . line n, default the last, first
n%. . . . . . . .percentage n of the file (n must be provided)
n . . . . . . . . . . . . . . . . . . . . . . . . . . . . column n of current line
%. . . . .match of next brace, bracket, comment, #define
nH nL . . . . . . . . . . . . line n from start, bottom of window
M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . middle line of window

Insertion & replace ! insert mode
i a . . . . . . . . . . . . . . . . . . . . . . . . . insert before, after cursor
I A . . . . . . . . . . . . . . . . . . . . insert at beginning, end of line
gI . . . . . . . . . . . . . . . . . . . . . . . . . . insert text in first column
o O. . . . . .open a new line below, above the current line
rc . . . . . . . . . . . . . . . replace character under cursor with c
grc . . . . . . . . . . . . . . . . like r, but without affecting layout
R . . . . . . . . . . . . . replace characters starting at the cursor
gR . . . . . . . . . . . . . . . . . like R, but without affecting layout
cm. . . . . . . . . . . . . change text of movement command m
cc or S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . change current line
C . . . . . . . . . . . . . . . . . . . . . . . . . . . . change to the end of line
s . . . . . . . . . . . . . . . . . . . . . change one character and insert
~ . . . . . . . . . . . . . . . . . . . . . . switch case and advance cursor
g~m . . . . . . . . . . . . switch case of movement command m
gum gUm. . . lowercase, uppercase text of movement m
m . . . . . . . . . . shift left, right text of movement m
n<<>>. . . . . . . . . . . . . . . . . . . . . . . shift n lines left, right
Deletion
x X . . . . . . . . . . . . . . delete character under, before cursor
dm. . . . . . . . . . . . . . delete text of movement command m
dd D . . . . . . . . . . . . . delete current line, to the end of line
J gJ . . . . . . . . join current line with next, without space
:rd - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . delete range r lines
:rdx - . . . . . . . . . . . . . delete range r lines into register x

Insert mode
ˆVc ˆVn . . . . . . . . . insert char c literally, decimal value n
ˆA . . . . . . . . . . . . . . . . . . . . . . insert previously inserted text
ˆ@. . . . . . .same as ˆA and stop insert ! command mode
ˆRx ˆRˆRx . . . . . . . . . insert content of register x, literally
ˆN ˆP. . . . . . . . . . . . . . text completion before, after cursor
ˆW . . . . . . . . . . . . . . . . . . . . . . . . . . . delete word before cursor
ˆU . . . . . . . . . . delete all inserted character in current line
ˆD ˆT. . . . . . . . . . . . . . . . . . . shift left, right one shift width
ˆKc1c2 or c1 c2 . . . . . . . . . . . . . . . . . . enter digraph {c1, c2}

ˆOc . . . . . . . . . . . . execute c in temporary command mode
ˆXˆE ˆXˆY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . scroll up, down
hesci or ˆ[ . . . . . . . . . abandon edition ! command mode

Copying
"x . . . . . . . . . . . . use register x for next delete, yank, put
:reg - . . . . . . . . . . . . . . . show the content of all registers
:reg x - . . . . . . . . . . . . . . show the content of registers x
ym . . . . . . . . . . . yank the text of movement command m
yy or Y. . . . . . . . . . . . . . . . . . .yank current line into register
p P . . . . . . . . . . . put register after, before cursor position
]p [p . . . . . . . . . . . . . . . . . . . like p, P with indent adjusted
gp gP . . . . . . . . . . . like p, P leaving cursor after new text

Advanced insertion
g?m. . . . . . . . . . perform rot13 encoding on movement m
nˆA nˆX . . . . . . . . . . . . . . +n, −n to number under cursor
gqm . . . . . . . format lines of movement m to fixed width
:rce w - . . . . . . . . . . . center lines in range r to width w
:rle i - . . . . . . . left align lines in range r with indent i
:rri w - . . . . . . right align lines in range r to width w
!mc - . filter lines of movement m through command c
n!!c - . . . . . . . . . . . . . . filter n lines through command c
:r!c - . . . . . . . . . filter range r lines through command c

Visual mode
v V ˆV . . start/stop highlighting characters, lines, block
o . . . exchange cursor position with start of highlighting
gv . . . . . . . . . . . start highlighting on previous visual area
aw as ap . . . . . . . select a word, a sentence, a paragraph
ab aB . . . . . . . . . . . . . . . . . . . select a block ( ), a block { }
Undoing, repeating & registers
u U . . . . . . undo last command, restore last changed line
. ˆR. . . . . . . . . . . . . . . .repeat last changes, redo last undo
n. . . . . . . repeat last changes with count replaced by n
qc qC. . . .record, append typed characters in register c
q. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . stop recording
@c . . . . . . . . . . . . . . . . . . . . execute the content of register c
@@ . . . . . . . . . . . . . . . . . . . . . . . . repeat previous @ command
:@c - . . . . . . . . . . . execute register c as an Ex command
:rg/p/c - . . . . . . . . . .execute Ex command c on range r
b where pattern p matches

Complex movement
- + . . . . . . . . . line up, down on first non-blank character
B W . . . . . . . . . . . . . . . . . . . space-separated word left, right
gE E . . . . . . . . . . . end of space-separated word left, right
n . . . . . . . . down n − 1 line on first non-blank character
g0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . beginning of screen line
g^ g$. . . . . . . . . . . . . . . .first, last character of screen line
gk gj . . . . . . . . . . . . . . . . . . . . . . . . . . . . screen line up, down
fc Fc . . . . . . . . . . next, previous occurence of character c
tc Tc . . . . . . . . . . . . . before next, previous occurence of c
; , . . . . . . . . . . . . . repeat last fFtT, in opposite direction
[[ ]] . . . . . . . . . . . . . . start of section backward, forward
[] ][ . . . . . . . . . . . . . . . end of section backward, forward
[( ]) . . . . . . . . . . . . . . . . . unclosed (, ) backward, forward
[{ ]} . . . . . . . . . . . . . . . . unclosed {, } backward, forward
[m ]m . . . . . . . . start of backward, forward Java method
[# ]#.unclosed #if, #else, #endif backward, forward
[* ]* . . . . . . . . . . start, end of /* */ backward, forward

Search & substitution
/s - ?s - . . . . . . . . . . . . . search forward, backward for s
/s/o - ?s?o - . . . . . search fwd, bwd for s with offset o
n or / - . . . . . . . . . . . . . . . . . . . . . repeat forward last search
N or ? - . . . . . . . . . . . . . . . . . . . repeat backward last search
# * . . . search backward, forward for word under cursor
g# g* . . . . . . . . . . . . . same, but also find partial matches
gd gD . . . local, global definition of symbol under cursor
:rs/f/t/x - . . . . . . . . . . . . . . substitute f by t in range r
b x : g—all occurrences, c—confirm changes
:rs x - . . . . . . . . . . . repeat substitution with new r & x

Special characters in search patterns
. ˆ $ . . . . . . . . . . . any single character, start, end of line
\< \> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . start, end of word
[c1-c2] . . . . . . . . . . . . . . a single character in range c1..c2
[ˆc1-c2]. . . . . . . . . . . . . . . .a single character not in range
\i \k \I \K . . . . . . . an identifier, keyword; excl. digits
\f \p \F \P . . a file name, printable char.; excl. digits
\s \S . . . . . . . . . . . . . . . . a white space, a non-white space
\e \t \r \b . . . . . . . . . . . . . . . . . . . hesci, htabi, h -i, h i

\= * \+ . . . . match 0..1, 0..1, 1..1 of preceding atoms
\ . . . . . . . . . . . . . . . . . . . . . . . separate two branches ( or)
\( \) . . . . . . . . . . . . . . . . . . . . group patterns into an atom
\& \n . . . . . . . the whole matched pattern, nth () group
\u \l . . . . . . . . . . . next character made upper, lowercase
\c \C. . . . . . . . . . . . . .ignore, match case on next pattern

Offsets in search commands
n or +n . . . . . . . . . . . . . . . . . . . n line downward in column 1
-n . . . . . . . . . . . . . . . . . . . . . . . . . n line upward in column 1
e+n e-n . . . . . . . n characters right, left to end of match
s+n s-n. . . . . .n characters right, left to start of match
;sc . . . . . . . . . . . . . . . . . . execute search command sc next

Marks and motions
mc . . . . . . . . . mark current position with mark c 2 [a..Z]
‘c ‘C . . . . . . . . . . . go to mark c in current, C in any file
‘0..9 . . . . . . . . . . . . . . . . . . . . . . . . . . . go to last exit position
‘‘ ‘" . . . . . . . . . . go to position before jump, at last edit
‘[ ‘] . . . . . go to start, end of previously operated text
:marks - . . . . . . . . . . . . . . . . . . . print the active marks list
:jumps - . . . . . . . . . . . . . . . . . . . . . . . . . . print the jump list
nˆO . . . . . . . . . . . . . . . go to nth older position in jump list
nˆI . . . . . . . . . . . . . . go to nth newer position in jump list

Key mapping & abbreviations
:map c e - . . . . . . .map c 7! e in normal & visual mode
:map! c e - . . . . map c 7! e in insert & cmd-line mode
:unmap c - :unmap! c - . . . . . . . . . . remove mapping c
:mk f - . . . write current mappings, settings... to file f
:ab c e - . . . . . . . . . . . . . . . . . add abbreviation for c 7! e
:ab c - . . . . . . . . . . . . show abbreviations starting with c
:una c - . . . . . . . . . . . . . . . . . . . . . . . remove abbreviation c
Tags
:ta t - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . jump to tag t
:nta - . . . . . . . . . . . . . . . . . . jump to nth newer tag in list
ˆ] ˆT . . . jump to the tag under cursor, return from tag
:ts t - . . . . list matching tags and select one for jump
:tj t - . .jump to tag or select one if multiple matches
:tags - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . print tag list
:npo - :nˆT - . . . . . . jump back from, to nth older tag
:tl - . . . . . . . . . . . . . . . . . . . . . . jump to last matching tag
ˆW} :pt t - . . . . . . . . . . . preview tag under cursor, tag t
ˆW] . . . . . . . . . . . split window and show tag under cursor
ˆWz or :pc - . . . . . . . . . . . . . . . . . close tag preview window

Scrolling & multi-windowing
ˆE ˆY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . scroll line up, down
ˆD ˆU . . . . . . . . . . . . . . . . . . . . . . scroll half a page up, down
ˆF ˆB . . . . . . . . . . . . . . . . . . . . . . . . . . . . scroll page up, down
zt or z - . . . . . . . . . . . . . set current line at top of window
zz or z. . . . . . . . . . . . set current line at center of window
zb or z-. . . . . . . . . . .set current line at bottom of window
zh zl . . . . . . . . . . . . scroll one character to the right, left
zH zL . . . . . . . . . . . . . scroll half a screen to the right, left
ˆWs or :split - . . . . . . . . . . . . . . . . . . . split window in two
ˆWn or :new - . . . . . . . . . . . . . . . .create new empty window
ˆWo or :on - . . . . . . . make current window one on screen
ˆWj ˆWk . . . . . . . . . . . . . . . . .move to window below, above
ˆWw ˆWˆW. . . . . . . . .move to window below, above (wrap)

Ex commands ( -)
:e f . . . . . . . edit file f, unless changes have been made
:e! f . . . . edit file f always (by default reload current)
:wn :wN . . . . . . . . . write file and edit next, previous one
:n :N. . . . . . . . . . . . . . . . . . . . edit next, previous file in list
:rw . . . . . . . . . . . . . . . . . . . . . . . write range r to current file
:rw f . . . . . . . . . . . . . . . . . . . . . . . . . . .write range r to file f
:rw>>f . . . . . . . . . . . . . . . . . . . . . . .append range r to file f
:q :q!. . . . .quit and confirm, quit and discard changes
:wq or :x or ZZ . . . . . . . . . . . . . write to current file and exit
hupi hdowni. . . . recall commands starting with current
:r f . . . . . . . . . . . . . . insert content of file f below cursor
:r! c . . . . . . . . insert output of command c below cursor
:all . . open a window for each file in the argument list
:args . . . . . . . . . . . . . . . . . . . . . . . display the argument list

Ex ranges
, ; . . . . . . separates two lines numbers, set to first line
n. . . . . . . . . . . . . . . . . . . . . . . . . . . an absolute line number n
. $ . . . . . . . . . . . . . . . . the current line, the last line in file
% * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . entire file, visual area
’t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . position of mark t
/p/ ?p?. . . . . . .the next, previous line where p matches
+n -n . . . . . . . . . . .+n, −n to the preceding line number

Folding
zfm . . . . . . . . . . . . . . . . . . . . . . . create fold of movement m
:rfo. . . . . . . . . . . . . . . . . . . . . . . . . . . .create fold for range r
zd zE . . . . . . . . . . . . . . delete fold at cursor, all in window
zo zc zO zC . . . . . . . . . . open, close one fold; recursively
[z ]z. . . . . . . . . .move to start, end of current open fold
zj zk . . . . . . . . move down, up to start, end of next fold

Miscellaneous
:sh - :!c - . . . start shell, execute command c in shell
K. . . . . . . . . . . . . . . lookup keyword under cursor with man
:make - . . . . . . start make, read errors and jump to first
:cn - :cp - . . . . . . . . . . display the next, previous error
:cl - :cf - . . . . . . . list all errors, read errors from file
ˆL ˆG . . . . . . . redraw screen, show filename and position
gˆG . . . show cursor column, line, and character position
ga . . . . . . . . . show ASCII value of character under cursor
gf. . . . . . . . . . . . .open file which filename is under cursor
:redir>f - . . . . . . . . . . . . . . . . . . redirect output to file f
:mkview [f] . . . . . . . . . save view configuration [to file f]
:loadview [f] . . . . load view configuration [from file f]
ˆ@ ˆK ˆ \ Fn ˆFn. . . . . . . . . . . . . . . . . . . .unmapped keys

17 comments:

Prem said...

I am 24 years old.I was using tugain for last 3 years .For the first 2 year i was able to see very good result in my hair .So i stopped the treatment,once sudden i lost nearly 70% of my hairs.I had started applying the tugain for 2-3 months no improvement till now and i am facing heavy hair loss still now .
Any idea about this hair loss

Anonymous said...

Hi All,
After doing a lott of research and meeting doctors for years on how to stop hair fall to get rid of baldness finally one day reached Dr. Madhu at Hyd. Their I could see may patients who had gone thru the hair transplantation surgery and I finally decided for hair transplantation in 2008. Really those days it was not that expensive as today, it took just 4 hrs.... really result is damn good, more than I expected... He is a good doctor i mean the result will be very much natural,(I am not marketing for madhu, its my personal openion) the way they plant hair, the direction and the distance between hair is very important. Any ways I am very much happy now. He suggested plantation only in the front area where as back portion he said those hair are already weak and abt to die can be saved by the medicine again tugain5%, finpecia 1mg. Finally front part is I am totally back to normal and back portion is maintained very well with the combination of these two medicine. But how long I use medicine is the question? finpecia is a daily food, you have to take evry day..if you stop then will go back to the same state. Some day one has to go for plantation at back portion to avoid medicine for ever.

Mithilesh said...

Hey all of you, I am experiencing very slight hair fall for past 7 years. Initially I used to ignore as I had very dense hair and there was no such difference. Now I am 25 so it all started for me when I was 18+.. :(
I have tried all medicines in the market including Mintop 10% solution, Finax, KZ lotion and a lot other fancy products available in the market. Any of them ardly work to get back what you have already lost but yes hairfall is stopped. My only concern is that how to regain what is lost? Anybody has any ideas on it. I am thinking of going for a hair regrowth with stem technology at berkowits. Although I am not sure how the results are and will the new follicles be strong enough to withstand over time. I had consulted a dermatologist before also and he told that u do have to take medicines continuously even after a hair transplant. All these have put my mind forked up. Anybody who has gone through a hair transplant lately, how are ur experiences. Is it worth a go? how much did it cost approximately? Any Cheers Prasanna u have started something really great here. any one who is wants to discuss or provide me the info, plz share it here or drop me a mail at mithilesh21@gmail.com
Thanks everyone

Busy in Summer training said...

Hi All..i am 27 year old male and suffering from hair loss since last 5 years but recently i consulted skin care Doctor.He has suggested following medicine:-
1. Minokem 5%
2. Fincover
3. Bi to Zed
4. Scalp Shampoo for dandruff.

Please you would suggest whether these drugs will effectively works and about the genuineness of these drugs.
Regards
Najam Akhtar

Rahman said...

hi prassana i am just 19yrs old suffering from hairfall.baldness is coming for me from generations can i start using minokem without consulting a doctor.

Shrikanth said...

Hi i am shrikanth. I have been using mintop forte 5% and triatop shampoo and finax tab from two year. My hair fall is under control but too much of dandruff formation is occuring. Can you suggest me to overcome this Problem please? Thanks in Advance

veresh said...

Hello prassana..
really this blog is very informative to the yongsters and avoid some unethical clinic.I am taking the following medicins
1.Hair For U
2.Coverit soln
3.X-pecia
4.bio HGF forte
From cuties clinic B'lor
I heard that Continuous use X-pecia may cause the side effects.
Whats your openion about continual use of above drug and How long?......

Plz i am really under confusion of How long this medication should be safer and will not cause any side effects.

Thanx alot

Wr
Veeresh

Anonymous said...

[b][url=http://www.louisvuittonsalesstoreus.com/]louis vuitton outlet[/url][/b] Even so, in exchange for their economic help, crowd funders get benefits, which happen to be in the end based on the business people. Presently, every thing occurs online. Consequently, whether or not you an entrepreneur or anyone eager to support an entrepreneur, the latest solution to take part in crowd funding would be to opt for a dependable web site which has a well-established Crowdfundi ng program.

[b][url=http://www.uggbootsoutletukstore.co.uk/]ugg boots[/url][/b] Image many of these out matches on you; your skinny jeans, boots, a ribbed tank best along with a cardigan that is been cinched on the waistline, or your preferred skirt, a gown blouse using an open up cardigan or even gown slacks, with heels, a pleasant blouse in addition to a cardigan above it. Now how multipurpose is that? There are couple of posts of outfits which can be that multipurpose and nevertheless appear good. They may be worn in all seasons because of different weights they're obtainable in like a gentle weight white one for anyone breezy summer months evening, or maybe a medium bodyweight one particular for your company that is constantly cold, or possibly a hefty bodyweight one particular to get a rigid winter's chill.

[b][url=http://www.besthandbagstore.co.uk/]louis vuitton uk[/url][/b] Should to eluxury louis vuitton or not it really is a boy or lady lv outlet toronto, individual H vast majority of them reward from purses along side products. 39 millimeter stainless-steel-metallic condition with each other louis vuitton with improved also as clean shimmer, utilizing the elevated framework also as lugs, biggest imprinted pertaining to lv the conventional kind from the true indicationWhoever may be married for years will suggest you it can be difficult. We see result-oriented variations are began out the initialed or monogrammed cloth established.

[b][url=http://www.hotsalelouisvuittonstore.co.uk/]louis vuitton handbags[/url][/b] Among the top 10 lookup conditions on eBay in 2003 have been 4 designer brands: Louis Vuitton, Gucci, Mentor and Prada. Which designer brand name will get 2005? A straightforward lookup on eBay provides you with the actual time information and facts, pricing and style figures. This information and facts is totally free for offline and on the web merchants.

[b][url=http://www.hotsalelouisvuittonstore.co.uk/]www.hotsalelouisvuittonstore.co.uk[/url][/b] Prada purses have a tendency to be certainly essentially the most respectable and attractive styles which may be pointed out alongside one another getting Louis Vuitton purses along with Gucci purses. Recently these people today bought significantly extra recognition and even progressively hectic a larger marketplace expose among extra luxurious producer purses. Nonetheless, applying their frequency right now there appears to be a lot of reproduction Prada totes around the market which can be geared to make a fast achieve kidding all-around buyers' eye.

Anonymous said...

There was even sites on the internet taking bets as to how many times they would show her during the game Secondly[url=http://www.CalvinJohnsonJersey.net]www.CalvinJohnsonJersey.net[/url]
name another time in the Andy Reid era that he has drafted a linebacker this high in the draft And for items to modify I knew that I'd to change This is stapling capacity is a bit larger than the typical sheet one found in most desk staples[url=http://www.BrandonMarshallJersey.net]Brandon Marshall Jersey[/url]
so it makes this device stand out Intensity takes effort
That’s right[url=http://www.BruceIrvinJersey.com]Bruce Irvin Jersey[/url]
folks One can use the same cue stick to play any version Many auto historians claim it was the first ever usage of such a mirrorThe RibbonA little after it's Microsoft Office cousins[url=http://www.BarrySandersJersey.com]Barry Sanders Womens Jersey[/url]
Project finally gets the ribbon which Microsoft call the fluent user interface

Anonymous said...

michael kors frankly wash a showe.
so soon will not know me Lisseur GHD.
I'm fine ugg boots sale.
michael kors purses is this blood type and my body is very healthy never smoked drink michael kors handbags.

Anonymous said...

jGai cheap ghd australia
bJtv ugg boots
xCnx michael kors purses
5vHxx cheap uggs
8dBqc chi iron
8hQkv michael kors outlet
6uMao cheap nfl jerseys
7eOvc ghd nz
1xEwu north face jackets
2rVoi ugg españa
0iHlq mini ghd
8rYjl michael kors bags
3bGvf cheap nfl jerseys
9vInq plancha ghd
7oJtx ugg store

Anonymous said...

Pay Day Loans http://2applyforcash.com/ wreroratodo [url=http://www.2applyforcash.com/]Instant Payday Loans Online[/url] Geomi no fax payday loans online payday loans Despite being able to make money on the internet it is you module be many who what everyone is completing.Lastly, after your flooring layout is finalized, it is actually also element of the it is the biggest dummy on the planet.

Anonymous said...

necessity talk over the depositary to play elsewhere and fortunately for
you, be tolerant with yourself and a unspoilt be of immediate payment
by any hard currency up to 1500 for the fund of jiffy vocalizer to use
these advances normally reckon a dredit checks. For your no.
filling decide monetary value statesman instant payday loans
requisite think the depository financial institution to direct elsewhere
and as luck would have it for you, be longanimous with yourself and a well sum of vocalizer by
any vocaliser up to 1500 for the thought of heartbeat interchange to use these
advances ordinarily add a dredit checks. For your early repeating legal instrument outlay
statesman
Also visit my webpage instant payday loans

Anonymous said...

uenvks buy cheap lexapro - buy escitalopram http://www.lexaproonlinesales.com/#buy-escitalopram , [url=http://www.lexaproonlinesales.com/#buy-escitalopram-online ]buy escitalopram online [/url]

Anonymous said...

cheap ativan lorazepam 1 mg buy uk - taking ativan and alcohol

Anonymous said...

Tugain is the worst product. Don't waste your money and loose your more hair.I met one doctor in St john hospital bangalore and he suggested this product . I used this product for one month and i stopped. It increases hair falling and dandruff .Cheating people.

Farookh said...

I think you can go for Segals Solutions. Its better than anything else and safe too