Archive | Vi/Vim RSS feed for this section

VIM options

11 Nov

Good things to do with VIM
http://items.sjbach.com/319/configuring-vim-right

Advertisements

Convert to dos or unix or mac

25 Jul

:set fileformat=dos
:set fileformat=mac
:set fileformat=unix

converting tabs to spaces

25 Jul

first :

:set expandtab
:%retab

Vi – shell

6 May

to get to a shell from vi you can:


:set shell=/bin/bash
:shell

Delete until a certain character on the line

13 Apr

dfx, delete from here until the character “x”

Split windows

16 Dec

to make a window bigger: Ctrl-w, +
to make a window smaller: Ctrl-w, –

if you want to do it by more than 1 line, precede it with a number

Increment/Decrement

5 Mar

To increment the number under the cursor: Ctrl-a
To decrement the number under the cursor: Ctrl-x