find inefficiency; find a quicker way; make it a habit
Habit 1: Moving around quickly
/ to search
use * again and again. * - search for next
use folding
Habit 2: Don't type it twice
Ctrl-N - keyword completion
Omni-completion in Vim 7
Habit 3: Fix it when it's wrong
spellchecker in Vim 7
add new abbrevation - :iabbrev teh the
add keyword for spellcheck - : syntax keyword WordError teh
Habit 4: A file seldom comes alone
ways to find your old files.
:!ctags -R . generate tags for all files under current directory (and sub directory)
:tag init
:tnext
:grep "\
:cnext
Go to the file
gf
Habit 5: Let's work together
copy text from vi to Word or other editors.
Habit 6: Text is structured
how to go from warnings/errors to source
map
:cfile %
Habit 7: Sharpen the saw
keep on tuning the set of commands you use
folding
automatic indenting
Plugins
edit files over a network
advanced scripting
No comments:
Post a Comment