[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]
4chanarchives logo

Vim guides/tutorials


Thread replies: 13
Thread images: 1

File: images (1).png (13KB, 402x366px) Image search: [Google] [Yandex] [Bing]
images (1).png
13KB, 402x366px
New to learning VIM. Willing to invest a couple of hours everyday for a month to go from beginner to advanced. Any guides, tutorials or suggestions?
>>
>>55173670
start by
$ vimtutor
>>
>>55173670
Download a cheat sheet and use it.
>>
Use SpaceMacs
>>
Forget HJKL, they're not that important long-term and you can use the arrow keys for now.

The best commands for a beginner:

c, which let's you "change" text

d, which deletes and puts on the clipboard

x, which deletes

v, which enters visual mode (basically mouse highlighting but done with the keyboard)

V, line visual mode, in which you select entire lines (VERY powerful)

u undoes

p pastes

i which enters insert mode before cursor

a which does it after

r replaces one character

A which enters insert mode at end of line

Best navigation commands:

0 takes you to the beginning of line

% takes you between the braces of a scope (VERY powerful)

w moves forward a word

b moves back a word

<number>G goes to that line

You can use numbers before navigation commands like shown above to do a command over multiple of whatever it is.

Useful combos:

cw "Change word" - Delete the word the cursor is at and enter insert mode

c<number>w - Same, but multiple words

%v% - select the entire scope you're in

dd - Delete line

d<number>d <delete number of lines>

There are some good cheat sheets you can Google that'll give you more.

And vimtutoris a good intro, just don't use HJKL. They'll destroy your fingers.
>>
>>55175394
Do arrows let me perform dl?
>>
>>55175394
>forget hjkl
Don't listen to this
>>
>>55175394
>not posting ciw and ci(
literally the best thing ever
>>
http://vim-adventures.com/

Have fun :) (It's a great resource to get going)
>>
>>55177152
You gotta pay to learn? Nuh uh
>>
>>55175394
>Forget HJKL
aw shit
>you can use the arrow keys for now
stopped reading there
>>
>>55173670
Don't worry too much about learning all the different commands and keys. There are a lot and it can be overwhelming. Start with the most basic ones and learn more as you need them.

Also, once you get up to speed, Vim is all about plugins and scripts to add functionality. Which ones will depend on your preferences and what you are using Vim for.
>>
c i ) - change inside brackets
c i " - change inside "
d $ - delete till end of line
d w - delete word
w - move word back
b - move word back
2 w - move 2 words foward
d 2 w - delete 2 words forward
$ - move to end of line
0 - move to start of line
h j k l - navigation - no need to move hand to beginning

.vimrc

inoremap jj <Esc> - Pressing j 2 times fast = Esc, no need to move hand to esc
Thread replies: 13
Thread images: 1
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK