You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.8 KiB

4 years ago
4 years ago
  1. # vim-config-beagle
  2. The Vim editor can be configured for a basic or advnaced usage. This first approximation is a medium term configuration that enables number lines, syntax on and spell-check options on. Also, some plug-ins are installed to work with `org` files and some kind of File-Explorer Tree (NerdTree) by using the Vim-Plug Framework
  3. ```
  4. " General
  5. set number " Show line numbers
  6. set linebreak " Break lines at word (requires Wrap lines)
  7. set showbreak=+++ " Wrap-broken line prefix
  8. set textwidth=100 " Line wrap (number of cols)
  9. set showmatch " Highlight matching brace
  10. set visualbell " Use visual bell (no beeping)
  11. " Use vim defaults (drop compatibility with vi)
  12. set nocompatible
  13. syntax on " Enable syntax highlight
  14. " more powerfull backspace
  15. set ruler " Show cursor position
  16. set modeline " Enable modelines
  17. set showcmd " Show incomplete commands
  18. set ttymouse=xterm2 " Make mouse works inside screen terminal emulator
  19. "Spell
  20. au BufRead *.txt setlocal spell
  21. au BufRead *.org setlocal spell
  22. au BufRead *.md setlocal spell
  23. set langmenu=en_US
  24. " Autofix some mistakes
  25. cab W w
  26. cab Wq wq
  27. cab wQ wq
  28. cab WQ wq
  29. cab Q q
  30. " Plugins manager
  31. call plug#begin()
  32. " NerdTree
  33. Plug 'preservim/NERDTree'
  34. Plug 'tpope/vim-speeddating'
  35. Plug ' jceb/vim-orgmode'
  36. call plug#end()
  37. ```
  38. #
  39. ## Spell Checking
  40. Spell checking wouldn’t be very useful if you didn’t have any help correcting the misspelled words, or a way to tell the program that the word is actually correct. Let’s start with correcting words.
  41. To move to a misspelled word, use ]s and [s. The ]s command will move the cursor to the next misspelled word, the [s command will move the cursor back through the buffer to previous misspelled words.
  42. Once the cursor is on the word, use z=, and Vim will suggest a list of alternatives that it thinks may be correct.