Advertisement
Guest User

.vimrc

a guest
May 30th, 2021
5,316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. "General editor settings
  2. set tabstop=4
  3. set nocompatible
  4. set shiftwidth=4
  5. set expandtab
  6. set autoindent
  7. set smartindent
  8. set ruler
  9. set showcmd
  10. set incsearch
  11. set shellslash
  12. set number
  13. set relativenumber
  14. set cino+=L0
  15. syntax on
  16. filetype indent on
  17. filetype off
  18. setlocal indentkeys-=:
  19.  
  20. "Theme (requires Solarized Light terminal theme to work properly)
  21. let g:solarized_termcolors=256
  22. set background=light
  23. colorscheme solarized
  24.  
  25. "keybindings for { completion, "jk" for escape, ctrl-a to select all
  26. inoremap {<CR> {<CR>}<Esc>O
  27. inoremap {} {}
  28. imap jk <Esc>
  29. map <C-a> <esc>ggVG<CR>
  30. set belloff=all
  31.  
  32. "Append template to new C++ files
  33. autocmd BufNewFile *.cpp 0r /home/jayleeds/vimcp/Library/Template.cpp
  34.  
  35. "Compile and run
  36. "Note that this line requires the build.sh script!
  37. autocmd filetype cpp nnoremap <F9> :w <bar> !build.sh %:r <CR>
  38. autocmd filetype cpp nnoremap <F10> :!./%:r<CR>
  39.  
  40. "LaTeX settings
  41. autocmd FileType tex :NoMatchParen
  42. autocmd FileType tex :set tw=110
  43.  
  44. "Plugin setup
  45. set rtp+=~/.vim/bundle/Vundle.vim
  46. call vundle#begin()
  47. Plugin 'VundleVim/Vundle.vim'
  48. Plugin 'lervag/vimtex'
  49. Plugin 'octol/vim-cpp-enhanced-highlight'
  50. call vundle#end()
  51. filetype plugin indent on
  52. let g:vimtex_view_general_viewer = 'SumatraPDF'
  53. let g:vimtex_view_general_options = '-reuse-instance @pdf'
  54. let g:vimtex_view_general_options_latexmk = '-reuse-instance'
  55. let g:tex_flavor = 'latex'
  56. let g:vimtex_motion_matchparen = 0
  57. let g:vimtex_fold_manual = 1
  58. let g:vimtex_matchparen_enabled = 0
  59.  
  60. "Clipboard configuration
  61. let s:clip = '/mnt/c/Windows/System32/clip.exe' " change this path according to your mount point
  62. if executable(s:clip)
  63. augroup WSLYank
  64. autocmd!
  65. autocmd TextYankPost * if v:event.operator ==# 'y' | call system(s:clip, @0) | endif
  66. augroup END
  67. endif
  68.  
  69. au BufNewFile,BufRead *.tex
  70. \ set nocursorline |
  71. \ set nornu |
  72. \ set number |
  73. \ let g:loaded_matchparen=1 |
  74.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement