Just A Small Guideline

Feel free to browse the site. Don't be afraid to leave comments, they're supportive.
Please follow me on Twitter @ehldmnt and retweet my posts.

Friday, May 24, 2013

How to use Vim [Navigation and Text Editing]

Remember when you first started to type and everything was slow? Of course you looked down at the keys here and there to make sure you were pressing the right letter, but after that, you were good, right? Well, what's stopping you from learning Vim? I mean, yeah sure, to initially begin outside of input mode seems a bit odd, but to be honest, it really isn't that big of a deal. Vim is fast because it keeps you from reaching down for the mouse, or arrow keys every two seconds just to change your position, therefore, reducing the amount of movement your hands have to do, and also not forcing you to shift from your comfortable position [yes, Vim is for the lazy].


When you initially begin using Vim, you're probably a bit flustered that you can't just "start typing in text" right from the get go. Well, that's okay, just press the "i" key and you should be all set. Take note of the table below that tells of all the basics of moving and editing in Vim and give them a shot in the editor itself.



    i     Allows you to insert text where the cursor is.
I Allows you to insert text at the beginning of a line without whitespace
a Allows you to insert text at the end of a line.
oAllows you to insert text below the current line
OAllows you to insert text above the current line
Esc
Exit insert mode
j<n> Move the cursor down< A certain number of lines>
k<n>
Move the cursor up < A certain number of lines>
dd
Delete line
d<n>d
Delete a number of lines [including the one currently selected]
ggGo to the first line
GGo to the last line
g<n>gGo to a specific numbered line
x
Delete Character after cursor
X
Delete Character before cursor
w
Move an entire word ahead, ignoring spaces [white space]
b
Move an entire word back, ignoring spaces [white space]
dwdelete the next word
dbdelete the last word
d<n>wdelete the next <amount> words
d<n>bdelete the last <amount> words

Follow me on twitter! @ehldmnt

No comments: