Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 8.07 KB | None | 0 0
  1. "---------- .vimrc COMMON for NIE & Lab tools---------------------------------
  2. " ver 1.0
  3.  
  4. "---------- getting PLUGIN MANAGER -------------------------------------------
  5.  
  6. if !filereadable(expand("~/.vim/autoload/plug.vim"))
  7.    ! curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  8. endif
  9.  
  10. set nocompatible
  11. filetype off
  12.  
  13. " ---------- Plugs -----------------------------------------------------------
  14. call plug#begin()
  15.  
  16. " ---------- Plugins ---------------------------------------------------------
  17. " Run :PlugInstall after adding new plugins here -----------------------------
  18.  
  19. Plug 'scrooloose/nerdtree'
  20. Plug 'scrooloose/syntastic'                           " Syntax checking
  21. Plug 'jiangmiao/auto-pairs'                           " Autocompleting brackets
  22. Plug 'universal-ctags/ctags'                          " Tags in code
  23. Plug 'majutsushi/tagbar'                              " Tags browsers
  24. Plug 'Chiel92/vim-autoformat'                         " Autoformatting syntax
  25. Plug 'vim-airline/vim-airline'                        " Bottom tab line
  26. Plug 'vim-airline/vim-airline-themes'                 " Tab line extra theme
  27. Plug 'tpope/vim-sensible'                             " Basic of basic options
  28. Plug 'mileszs/ack.vim'
  29. Plug 'tpope/vim-fugitive'
  30. Plug 'morhetz/gruvbox'
  31. "Plug 'vim-scripts/taglist.vim'                        " Source code browser
  32. "Plug 'lifepillar/vim-mucomplete'                      " Autocomletion (TAB)
  33. "Plug 'ervandrew/supertab'                             " Autocomplete
  34. "Plug 'ctrlpvim/ctrlp.vim'                             " Fuzzy finder (ctrl + p)
  35. "Plug 'thaerkh/vim-indentguides'                       " Showing tabs and spaces
  36. "Plug 'Shougo/neocomplete'                             " Neo-compeltion with cache
  37. "Plug 'mpyatishev/vim-sqlformat'                       " Formatting SQL using
  38. "sqlparse
  39.  
  40. " ---------- Plugins loaded on demand ----------------------------------------
  41. Plug 'hdima/python-syntax', {'for': 'python'}         " Python syntax highlighting
  42. Plug 'davidhalter/jedi-vim', { 'for': 'python'  }     " Omnicomplete for Python
  43. Plug 'c9s/perlomni.vim', { 'for': 'perl'  }           " Omnicomplete for Perl
  44. Plug 'vim-perl/vim-perl', { 'for': 'perl'  }          " Extra Perl syntax
  45. Plug 'hushicai/tagbar-javascript.vim', { 'for': ['javascript', 'jsx'] }
  46. Plug 'maxmellon/vim-jsx-pretty', {'for': ['javascript', 'jsx']}
  47. "Plug 'mitsuhiko/vim-python-combined', {'for': 'python'} " Python syntax highlighting
  48. "Plug 'elzr/vim-json', { 'for': 'json'  }              " Extra JSON syntax
  49. "Plug 'mitsuhiko/jinja2', { 'for': 'jinja'  }          " Extra Jinja syntax
  50. "Plug 'chase/vim-ansible-yaml', { 'for': 'ansible'  }  " Extra Ansible/YAML syntax
  51. " ---------- Theme -----------------------------------------------------------
  52. Plug 'jonathanfilip/vim-lucius'                       " Visual Studio Dark Theme
  53.  
  54.  
  55. call plug#end()
  56.  
  57. "---------- Status line ------------------------------------------------------
  58. set tags=tags;/                     " Looks for tags file from current dir up to root
  59. let Tlist_Process_File_Always = 1   " Process tags in file while opening
  60. "let g:ctags_statusline=1
  61. "set statusline=%f%m%r%h%w\ [%n:%{&ff}/%Y]%=[0x\%04.4B][%03v]%p%%\ line\ %l\ of\ %L[\%{tagbar#currenttag('%s\ ',\ '')}]
  62. "set statusline+=%#warningmsg#
  63. "set statusline+=%{SyntasticStatuslineFlag()}
  64. "set statusline+=%*
  65. let g:airline_theme='dark'
  66.  
  67. " ---------- Plugins configuration -------------------------------------------
  68. let mapleader=","                               " Prefix key for mapping=> <Leader>
  69. let python_highlight_all=1                      " Enable more colorful syntax
  70. let g:jedi#force_py_version = 2
  71. let g:NERDTreeDirArrowExpandable = '▸'
  72. let g:NERDTreeDirArrowCollapsible = '▾'
  73. let g:NERDTreeWinSize=25
  74. let g:gruvbox_improved_strings=1
  75. let g:gruvbox_improved_warnings=1
  76. " airline settings                                                                                                
  77. let g:airline_exclude_preview=1    
  78. let g:airline_skip_empty_sections = 1
  79.  
  80.  
  81. "---------- Syntastic --------------------------------------------------------
  82. " let g:syntastic_always_populate_loc_list = 1
  83. " let g:syntastic_auto_loc_list = 1
  84. " let g:syntastic_check_on_open = 1
  85. " let g:syntastic_check_on_wq = 0
  86. " let g:syntastic_check_on_q = 0
  87. " let g:syntastic_check_on_w = 1
  88. " let g:syntastic_aggregate_errors = 1
  89. " let g:syntastic_loc_list_height = 5
  90. " let g:syntastic_python_checkers = ['pylint', 'python']
  91. " let g:syntastic_enable_perl_checker = 1
  92. " let g:syntastic_perl_checkers = ['perl', 'perlcritic', 'podchecker']
  93. " let g:syntastic_perl_perlcritic_args = '--harsh'
  94. " let g:syntastic_javascript_checkers = ['eslint']
  95. let g:jsx_ext_required = 0
  96.  
  97. "---------- Mappings ---------------------------------------------------------
  98. map <C-n> :NERDTreeToggle<CR>          " Toggle tree with Ctrl+n
  99. map <F2> :TagbarToggle<CR>
  100. set pastetoggle=<F3>
  101. noremap <F10> :Autoformat<CR>
  102. nnoremap <C-l> :wincmd l<CR>
  103. nnoremap <C-k> :wincmd k<CR>
  104. nnoremap <C-h> :wincmd h<CR>
  105. nnoremap <C-j> :wincmd j<CR>
  106. nnoremap <leader>w :w<CR>              " ...and so on - mapping as desired
  107.  
  108. colorscheme gruvbox                    
  109. set background=dark
  110. "colorscheme lucius                     " Enable Visual Studio Dark Theme
  111. "LuciusBlackLowContrast                 " Black Theme with low contrast
  112. syntax on                              " Syntax highlighting
  113. set t_Co=256                           " Set number of colours
  114. set t_ut=                              " Fix for background color
  115. set foldmethod=indent                  " Folding method
  116. "set foldmethod=syntax                  " Folding method
  117. set foldnestmax=2                      " Maximum folding nesting
  118. set colorcolumn=79                     " Set coloured line at the end of the line (79 chars)
  119. "set nowrap                             " Don't wrap the lines
  120. set wrap                               " Wrap the lines"
  121. set textwidth=79                       " Wrap lines on 80 chars
  122. set number                             " Always show line numbers
  123. set expandtab                          " Always use spaces instead of tab
  124. set tabstop=4                          " Use 4 spaces instead of tab
  125. set softtabstop=4                      " Number of columns for TAB
  126. set shiftwidth=4                       " Number of spaces to use for autoindenting
  127. set shiftround                         " Use multiple of shiftwidth when indenting with '<' and '>'
  128. set smarttab                           " Insert tabs on the start of a line according to shiftwidth, not tabstop
  129. set autoindent                         " Use the indent of a previous line for a newly created line
  130. "set copyindent                         " Copy the previous indentation on autoindenting
  131. "set list                               " Show whitespaces
  132. set splitright
  133. set history=200                        " Remember more commands and search history
  134. set undolevels=100                     " Use more levels of undo
  135. set hlsearch                           " Highlight searches
  136. set ignorecase                         " Ignore case when searching
  137. set smartcase                          " Case-sensitive when searching pattern contains uppercase
  138. set incsearch                          " Show search matches as you type"
  139. set showmatch                          " Show matching parenthesis
  140. set visualbell                         " Don't beep
  141. set noerrorbells                       " Don't beep
  142. "set laststatus=2                       " Enable status line
  143. set backspace=indent,eol,start         " Allow backspacing over everything in INSERT mode
  144. "set title                              " Change the terminal's title
  145. set wildignore=*.swp,*.bak,*.pyc,*.class
  146. set diffopt+=vertical
  147.  
  148. highlight LineNr ctermfg=White guifg=White
  149.  
  150. " ------------ Open last opened line -----------------------------------------
  151. if has("autocmd")
  152.    au BufReadPost * if line("'\"") > 0 && line("'\"")<= line("$")
  153.                \| exe "normal g'\"" | endif
  154. endif
  155.  
  156. let g:ackprg = 'ag --nogroup --column'
  157.  
  158.  
  159. cnoreabbrev Ack Ack!
  160. nnoremap <Leader>a :Ack!<Space>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement