settings.vim 3.2 KB

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