More on vim tips
2013-10-21 22:16
267 查看
1. dd will delete the whole line and cc will delete the whole line and change into insert mode.
2. use / or ? to do search , and use n or N to move to the next or previous one.
3. :set ignorecase
4. :set hlsearch
5. :nohlsearch
6. :noh
7. :800 this will go to the 800th line
8. /.[aoeiu] this will search any character followed by a vowel.
9. /\n\n this will search all the blank lines
10. in normal mode, press d, then press /, and enter something, then press enter, it will delete from the cursor to the characters you entered. also we can use "c" rather than "d" to enter into switch mode.
11. :s/aa/bb will substitute; if for the whole file, use :%s/aa/bb ; :%s/aa/bb/g will substitute several occurrences in the same line.
12. shift v will go into visual line mode.
13. in normal mode, say for a function, put your cursor under a bracket, then press v , then press "%" will select the whole block, then press ":" , then press s/echo/say/gc, here c for confirm. we can use "gv" to select the previous block.
Notes about using sublime text:
1. option + ] will give left single quote, option + [ will give left double quotes. option + shift + [ will give right double quotes, shift + option + ] will give left right single quote.
2. cmd + ] will indent the line
3. choose line->reindent will reindent the code you choose.
4. cmd + i for incremental search;
5. shift + cmd + f will give another finding method.
6. option + -> will move one word at a time.
7. command + p will go to everything
8. when you press "cmd + p", then press "#", this will go into fuzzy matching mode.
9. try css@ to see the elements related to css
10. shift + cmd + p will lead us to the command pallet
11. shift + cmd + l will split into lines.
12. ctrl + space to bring up the auto completion.
13.
2. use / or ? to do search , and use n or N to move to the next or previous one.
3. :set ignorecase
4. :set hlsearch
5. :nohlsearch
6. :noh
7. :800 this will go to the 800th line
8. /.[aoeiu] this will search any character followed by a vowel.
9. /\n\n this will search all the blank lines
10. in normal mode, press d, then press /, and enter something, then press enter, it will delete from the cursor to the characters you entered. also we can use "c" rather than "d" to enter into switch mode.
11. :s/aa/bb will substitute; if for the whole file, use :%s/aa/bb ; :%s/aa/bb/g will substitute several occurrences in the same line.
12. shift v will go into visual line mode.
13. in normal mode, say for a function, put your cursor under a bracket, then press v , then press "%" will select the whole block, then press ":" , then press s/echo/say/gc, here c for confirm. we can use "gv" to select the previous block.
Notes about using sublime text:
1. option + ] will give left single quote, option + [ will give left double quotes. option + shift + [ will give right double quotes, shift + option + ] will give left right single quote.
2. cmd + ] will indent the line
3. choose line->reindent will reindent the code you choose.
4. cmd + i for incremental search;
5. shift + cmd + f will give another finding method.
6. option + -> will move one word at a time.
7. command + p will go to everything
8. when you press "cmd + p", then press "#", this will go into fuzzy matching mode.
9. try css@ to see the elements related to css
10. shift + cmd + p will lead us to the command pallet
11. shift + cmd + l will split into lines.
12. ctrl + space to bring up the auto completion.
13.
相关文章推荐
- [Vim] Some tips on vim
- Database Testing – Practical Tips and Insight on How to Test Database
- [OOD-More C++ Idioms] 写时拷贝 (Copy on Write)
- [翻译Joel On Software]无痛功能需求 –第四部分:技巧/Painless Functional Specifications - Part 4: Tips
- Ruby On Rails 学习 Tips[1]
- Database startup hangs on Windows when machine has more than 64 cores
- Oral Presentations: Tips on How to Deliver a Speech for School or Work
- 003-巧用VIM和more以及less
- Vim的Python编辑器详细配置过程 (Based on Ubuntu 12.04 LTS)
- Tips on Google Desktop Search && Google Desktop Enterpris
- More On UIExtensionSites (Introduction To CAB/SCSF Part 14)
- [转]WaitForAllObjects to wait on more than MAXIMUM_WAIT_OBJECTS handles
- More information on github
- 5 Tips on Getting Rid of Acne
- Best of Vim Tips
- elasticsearch start more than one nodes on the same data folder
- Career Change: Tips on How to Look for a New Job
- Referenced file contains errors (http://www.springframework.org/schema/context). For more information, right click on the message in the Problems
- How to find more or better bugs (12 tips to explode your bug count and/ or severity)?