settings.vim 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. " set leader key
  2. map <Space> <Leader>
  3. set iskeyword+=- " treat dash separated words as a word text object"
  4. if !exists('g:vscode')
  5. syntax enable " Enables syntax highlighing
  6. set hidden " Required to keep multiple buffers open multiple buffers
  7. set nowrap " Display long lines as just one line
  8. set encoding=utf-8 " The encoding displayed
  9. set pumheight=10 " Makes popup menu smaller
  10. set fileencoding=utf-8 " The encoding written to file
  11. set ruler " Show the cursor position all the time
  12. set cmdheight=2 " More space for displaying messages
  13. set mouse=a " Enable your mouse
  14. set splitbelow " Horizontal splits will automatically be below
  15. set splitright " Vertical splits will automatically be to the right
  16. set t_Co=256 " Support 256 colors
  17. set conceallevel=0 " So that I can see `` in markdown files
  18. set tabstop=2 " Insert 2 spaces for a tab
  19. set shiftwidth=2 " Change the number of space characters inserted for indentation
  20. set smarttab " Makes tabbing smarter will realize you have 2 vs 4
  21. set expandtab " Converts tabs to spaces
  22. set smartindent " Makes indenting smart
  23. set autoindent " Good auto indent
  24. set laststatus=0 " Always display the status line
  25. set number " Line numbers
  26. set cursorline " Enable highlighting of the current line
  27. set background=dark " tell vim what the background color looks like
  28. set showtabline=2 " Always show tabs
  29. set noshowmode " We don't need to see things like -- INSERT -- anymore
  30. set nobackup " This is recommended by coc
  31. set nowritebackup " This is recommended by coc
  32. set shortmess+=c " Don't pass messages to |ins-completion-menu|.
  33. set signcolumn=yes " Always show the signcolumn, otherwise it would shift the text each time
  34. set updatetime=300 " Faster completion
  35. set timeoutlen=100 " By default timeoutlen is 1000 ms
  36. set formatoptions-=cro " Stop newline continution of comments
  37. set clipboard=unnamedplus " Copy paste between vim and everything else
  38. set incsearch
  39. " set autochdir " Your working directory will always be the same as your working directory
  40. " set foldcolumn=2 " Folding abilities
  41. au! BufWritePost $MYVIMRC source % " auto source when writing to init.vm alternatively you can run :source $MYVIMRC
  42. autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
  43. " You can't stop me
  44. cmap w!! w !sudo tee %
  45. endif