Configuration file for vim on macos
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
2.6 KiB

2 years ago
2 years ago
2 years ago
2 years ago
  1. " ------------------
  2. " __
  3. " .--.--.|__|.--------.----.----.
  4. " | | || || | _| __|
  5. " \___/ |__||__|__|__|__| |____|
  6. " ------------------
  7. "
  8. " Basic settings
  9. " --------------
  10. set nocompatible
  11. filetype plugin indent on
  12. syntax enable
  13. set number relativenumber
  14. set path+=**
  15. set wildmode=longest,list,full
  16. set encoding=UTF-8
  17. set cursorline
  18. set showmatch " matching brackets
  19. set linebreak
  20. set ignorecase " case insensitive matching
  21. set smartcase " smart case matching
  22. "set clipboard+=unnamedplus
  23. set mouse=a
  24. set tabstop=4
  25. set shiftwidth=4
  26. set softtabstop=4
  27. set spelllang=en_us
  28. set fillchars+=eob:~
  29. set showtabline=2
  30. set laststatus=2
  31. set backspace=indent,eol,start " more powerful backspacing
  32. " ------------------
  33. " Basic styling
  34. " ------------------
  35. highlight Comment cterm=italic
  36. highlight CursorLine ctermbg=Black cterm=NONE
  37. highlight CursorLineNr ctermbg=Black cterm=bold ctermfg=Green
  38. highlight LineNr ctermbg=Black ctermfg=White
  39. " OS detection
  40. " ---------------------------------------------
  41. if !exists("g:os_current")
  42. if system('uname -s') == "Linux\n"
  43. let g:os_current = "Linux"
  44. elseif system('uname -s') == "Darwin\n"
  45. let g:os_current = "Darwin"
  46. else
  47. echom "Error: the current operating system won't support my Vim Config"
  48. let g:os_current = "Other"
  49. endif
  50. endif
  51. " ---------------------------------------------
  52. " Plugin settings
  53. " ------------------
  54. call plug#begin()
  55. Plug 'https://github.com/Badacadabra/vim-archery'
  56. Plug 'vim-airline/vim-airline'
  57. Plug 'vim-airline/vim-airline-themes'
  58. Plug 'lervag/vimtex'
  59. Plug 'Valloric/YouCompleteMe'
  60. call plug#end()
  61. " Theme configuration
  62. " ------------------
  63. colorscheme archery
  64. let g:airline_theme = 'archery'
  65. set t_Co=256
  66. let g:airline_powerline_fonts=1
  67. let g:airline#extensions#tabline#left_sep = ' '
  68. let g:airline#extensions#tabline#left_alt_sep = '|'
  69. let g:airline_symbols = {}
  70. let g:airline_symbols.colnr = ' ㏇:'
  71. " LaTeX
  72. let g:tex_flavor='latex'
  73. set sw=2
  74. set iskeyword+=:
  75. let g:vimtex_view_method = "skim"
  76. let g:vimtex_compiler_latexmk= {'options' : ['-pdf', '-shell-escape', '-verbose', '-file-line-error', '-synctex=1', '-interaction=nonstopmode',],} " we need to enable -shell-escape to be able to use externalization library for avioiding recompiling unchanged diagrams/graphs created using tikz/pgfplots
  77. if !exists('g:ycm_semantic_triggers')
  78. let g:ycm_semantic_triggers = {}
  79. endif
  80. au VimEnter * let g:ycm_semantic_triggers.tex=g:vimtex#re#youcompleteme
  81. " ---------------------------------------------
  82. " Miscelanious
  83. " ---------------------------------------------
  84. " Easier write command
  85. let mapleader = " "
  86. nnoremap <leader>w <Cmd>write<CR>