-
Notifications
You must be signed in to change notification settings - Fork 3
Vim Tips
Michael Watts edited this page May 30, 2015
·
11 revisions
Typing :!<command>
will open a console window
Pause Vim with Ctrl+z
, play in the terminal, then return to Vim with the command fg
.
Select a block of text and press =
to fix formatting
ma
set a mark called referenced with a
mz
set a mark referenced with z
`a
jump to mark a
`z
jump to mark z
'a
jump to start of line for mark a
'z
jump to start of line for mark z
Hit Ctrl+v
to select a column then shift+I
to enter the text. Press Esc
shows inserted text.
Copy word (when cursor is anywhere within word) with yiw
Paste text and replace word with viwp
By adding the following lines to the .vimrc file
nmap <S-Enter> O<Esc>
nmap <CR> o<Esc>
We can hit shift+enter
whilst in normal mode.
di(
or di{
or di[
or di'
or di"
space
and space space