Advertisement
erickssb

vimrc

Oct 20th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 1.28 KB | None | 0 0
  1. " -----------------------------------------------------------------------------
  2. " File          :   vimrc
  3. " Author        :   Sam Erickson | https://samerickson.me
  4. " Last updated  :   Jul. 24th, 2019
  5. " -----------------------------------------------------------------------------
  6. let mapleader =","
  7.  
  8. call plug#begin('~/.config/nvim/plugins')
  9.     Plug 'vimwiki/vimwiki'
  10. call plug#end()
  11.  
  12. " Some basics:
  13.     set nocompatible
  14.     set nohlsearch
  15.     filetype plugin on
  16.     syntax on
  17.     set listchars=tab:>-,trail:ยท
  18.     set sw=4 sts=4 ts=4 noet
  19.     set splitbelow splitright
  20.  
  21. " Enable autocompletion:
  22.     set wildmode=longest,list,full
  23.  
  24. " Disables automatic commenting on newline:
  25.     autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
  26.  
  27. " Wrap text to 80 characters to keep my grades up at school
  28.     autocmd BufRead,BufNewFile *.md setlocal textwidth=80
  29.  
  30. " Personal shortcuts
  31.     nnoremap <leader>s :set spell!<CR>
  32.     nnoremap <leader>l :set list!<CR>
  33.     nnoremap S :%s//g<Left><Left>
  34.     nnoremap <leader>m :set number!<CR>
  35.     nnoremap <leader>n :set relativenumber!<CR>
  36.  
  37. " Open vimrc in new buffer / reload vimrc
  38.     nnoremap <silent> <leader>ev :new $MYVIMRC
  39.     nnoremap <silent> <leader>sv :so $MYVIMRC
  40.  
  41. " Changes for specific files types
  42.     autocmd filetype html,xml set shiftwidth=2 tabstop=2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement