Vim vim vim

I cant live without vim. Today is the day I understand this and have install vim on my home windows:) I hope that no one will start it accidently.

Ok. Here i will keep track of the commands that I use in vim.

configuring vim and nice screenshots tutorial

Here is more on the topic

  • Open many files in tabs:  vim -p file*
  • Search & Replace:  %s/something/nothing/g
  • cntrl-space in vim is: cntr-n /  cntrl-p
    load words from all pl/pm files: ctags *.p?
  • windows: :split / :vsplit
    cntr-w – switch
    :close
    :only
  • tabs:
  • set tabstop=2
    set autoindent
    << >>  size is controller:
    shiftwidth=4

VimDiff

Keyboard Shortcuts:

do – Get changes from other window into the current window.

dp – Put the changes from current window into the other window.

]c – Jump to the next change.

[c – Jump to the previous change.

Ctrl W + Ctrl W – Switch to the other split window.

3 Comments

  1. wrap long lines in vim:
    :set wrap

  2. set encoding=”utf8″
    set background=dark /light

  3. Replacing special characters:

    Putting this line in your .vimrc or .exrc file.
    :set magic

    Next, do:
    :s/,/,^M/g

    To get the ^M character, type ctrl-v and hit enter.

Comments are closed.

© 2024 Gudasoft

Theme by Anders NorénUp ↑