settings.vim 2.6 KB

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