Q
入門vim的
3
A
回答
5
這可能是以前搜索$
(行尾), 或顯式顯示行結束標記的結果。
您可以使用:set nohlsearch
禁用突出顯示的搜索結果。
您可以使用:set nolist
禁用行標記的顯式結束。
3
如果你真的要刪除的尾隨空白:
:%s/[[:space:]]\+$//
1
我有我的~/.vimrc
文件的功能,我使用我的節省routine`
fun! CleanExtraSpaces()
let save_cursor = getpos(".")
let old_query = getreg('/')
:%s/\s\+$//e
call setpos('.', save_cursor)
call setreg('/', old_query)
endfun
com! Cls :call CleanExtraSpaces()
" auto clean trailing spaces
if has("autocmd")
autocmd BufWritePre *.txt,*.js,*.py,*.wiki,*.sh :call CleanExtraSpaces()
endif
此代碼擺脫鏈接在保存期間所有exta空間中,或者您可以通過鍵入 手動調用它:Cls<Enter>
最重要的部分是:%s/\s\+$//e
\s\+ .............. one space or mor
$ ................. at the end of the line
e ................. if not exists any extra space it ignores error messages
相關問題
- 1. Vim-R-plugin難以入門
- 2. Zend Framework入門Eclipse入門
- 3. 入門的Javascript
- 4. 入門的表
- 5. 入門的UnitTest ++
- 6. 入門的NoSuchMethodError:javax.servlet.ServletContext.getVirtualServerName()
- 7. 入門的JSON
- 8. 入門插入的行ID
- 9. Python web框架的入門門檻低
- 10. Zend的Doctrine入門
- 11. CouchDB入門
- 12. 動畫入門
- 13. Flex3入門
- 14. 入門iOS中
- 15. GNUStep入門
- 16. purescript入門
- 17. Firefox API入門
- 18. Querydsl jpa入門
- 19. SOAP入門
- 20. Python入門YQL
- 21. ColdFusion入門?
- 22. JUCE Android入門
- 23. EHCache入門
- 24. JBOSS JBPM入門
- 25. node.js入門
- 26. Sencha Touch入門
- 27. 入門在Unity
- 28. 入門JSON
- 29. NHibernate入門
- 30. Android入門
:設置nohlsearch有竅門。謝謝 – abc