Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "---------- .vimrc COMMON for NIE & Lab tools---------------------------------
- " ver 1.0
- "---------- getting PLUGIN MANAGER -------------------------------------------
- if !filereadable(expand("~/.vim/autoload/plug.vim"))
- ! curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- endif
- set nocompatible
- filetype off
- " ---------- Plugs -----------------------------------------------------------
- call plug#begin()
- " ---------- Plugins ---------------------------------------------------------
- " Run :PlugInstall after adding new plugins here -----------------------------
- Plug 'scrooloose/nerdtree'
- Plug 'scrooloose/syntastic' " Syntax checking
- Plug 'jiangmiao/auto-pairs' " Autocompleting brackets
- Plug 'universal-ctags/ctags' " Tags in code
- Plug 'majutsushi/tagbar' " Tags browsers
- Plug 'Chiel92/vim-autoformat' " Autoformatting syntax
- Plug 'vim-airline/vim-airline' " Bottom tab line
- Plug 'vim-airline/vim-airline-themes' " Tab line extra theme
- Plug 'tpope/vim-sensible' " Basic of basic options
- Plug 'mileszs/ack.vim'
- Plug 'tpope/vim-fugitive'
- Plug 'morhetz/gruvbox'
- "Plug 'vim-scripts/taglist.vim' " Source code browser
- "Plug 'lifepillar/vim-mucomplete' " Autocomletion (TAB)
- "Plug 'ervandrew/supertab' " Autocomplete
- "Plug 'ctrlpvim/ctrlp.vim' " Fuzzy finder (ctrl + p)
- "Plug 'thaerkh/vim-indentguides' " Showing tabs and spaces
- "Plug 'Shougo/neocomplete' " Neo-compeltion with cache
- "Plug 'mpyatishev/vim-sqlformat' " Formatting SQL using
- "sqlparse
- " ---------- Plugins loaded on demand ----------------------------------------
- Plug 'hdima/python-syntax', {'for': 'python'} " Python syntax highlighting
- Plug 'davidhalter/jedi-vim', { 'for': 'python' } " Omnicomplete for Python
- Plug 'c9s/perlomni.vim', { 'for': 'perl' } " Omnicomplete for Perl
- Plug 'vim-perl/vim-perl', { 'for': 'perl' } " Extra Perl syntax
- Plug 'hushicai/tagbar-javascript.vim', { 'for': ['javascript', 'jsx'] }
- Plug 'maxmellon/vim-jsx-pretty', {'for': ['javascript', 'jsx']}
- "Plug 'mitsuhiko/vim-python-combined', {'for': 'python'} " Python syntax highlighting
- "Plug 'elzr/vim-json', { 'for': 'json' } " Extra JSON syntax
- "Plug 'mitsuhiko/jinja2', { 'for': 'jinja' } " Extra Jinja syntax
- "Plug 'chase/vim-ansible-yaml', { 'for': 'ansible' } " Extra Ansible/YAML syntax
- " ---------- Theme -----------------------------------------------------------
- Plug 'jonathanfilip/vim-lucius' " Visual Studio Dark Theme
- call plug#end()
- "---------- Status line ------------------------------------------------------
- set tags=tags;/ " Looks for tags file from current dir up to root
- let Tlist_Process_File_Always = 1 " Process tags in file while opening
- "let g:ctags_statusline=1
- "set statusline=%f%m%r%h%w\ [%n:%{&ff}/%Y]%=[0x\%04.4B][%03v]%p%%\ line\ %l\ of\ %L[\%{tagbar#currenttag('%s\ ',\ '')}]
- "set statusline+=%#warningmsg#
- "set statusline+=%{SyntasticStatuslineFlag()}
- "set statusline+=%*
- let g:airline_theme='dark'
- " ---------- Plugins configuration -------------------------------------------
- let mapleader="," " Prefix key for mapping=> <Leader>
- let python_highlight_all=1 " Enable more colorful syntax
- let g:jedi#force_py_version = 2
- let g:NERDTreeDirArrowExpandable = '▸'
- let g:NERDTreeDirArrowCollapsible = '▾'
- let g:NERDTreeWinSize=25
- let g:gruvbox_improved_strings=1
- let g:gruvbox_improved_warnings=1
- " airline settings
- let g:airline_exclude_preview=1
- let g:airline_skip_empty_sections = 1
- "---------- Syntastic --------------------------------------------------------
- " let g:syntastic_always_populate_loc_list = 1
- " let g:syntastic_auto_loc_list = 1
- " let g:syntastic_check_on_open = 1
- " let g:syntastic_check_on_wq = 0
- " let g:syntastic_check_on_q = 0
- " let g:syntastic_check_on_w = 1
- " let g:syntastic_aggregate_errors = 1
- " let g:syntastic_loc_list_height = 5
- " let g:syntastic_python_checkers = ['pylint', 'python']
- " let g:syntastic_enable_perl_checker = 1
- " let g:syntastic_perl_checkers = ['perl', 'perlcritic', 'podchecker']
- " let g:syntastic_perl_perlcritic_args = '--harsh'
- " let g:syntastic_javascript_checkers = ['eslint']
- let g:jsx_ext_required = 0
- "---------- Mappings ---------------------------------------------------------
- map <C-n> :NERDTreeToggle<CR> " Toggle tree with Ctrl+n
- map <F2> :TagbarToggle<CR>
- set pastetoggle=<F3>
- noremap <F10> :Autoformat<CR>
- nnoremap <C-l> :wincmd l<CR>
- nnoremap <C-k> :wincmd k<CR>
- nnoremap <C-h> :wincmd h<CR>
- nnoremap <C-j> :wincmd j<CR>
- nnoremap <leader>w :w<CR> " ...and so on - mapping as desired
- colorscheme gruvbox
- set background=dark
- "colorscheme lucius " Enable Visual Studio Dark Theme
- "LuciusBlackLowContrast " Black Theme with low contrast
- syntax on " Syntax highlighting
- set t_Co=256 " Set number of colours
- set t_ut= " Fix for background color
- set foldmethod=indent " Folding method
- "set foldmethod=syntax " Folding method
- set foldnestmax=2 " Maximum folding nesting
- set colorcolumn=79 " Set coloured line at the end of the line (79 chars)
- "set nowrap " Don't wrap the lines
- set wrap " Wrap the lines"
- set textwidth=79 " Wrap lines on 80 chars
- set number " Always show line numbers
- set expandtab " Always use spaces instead of tab
- set tabstop=4 " Use 4 spaces instead of tab
- set softtabstop=4 " Number of columns for TAB
- set shiftwidth=4 " Number of spaces to use for autoindenting
- set shiftround " Use multiple of shiftwidth when indenting with '<' and '>'
- set smarttab " Insert tabs on the start of a line according to shiftwidth, not tabstop
- set autoindent " Use the indent of a previous line for a newly created line
- "set copyindent " Copy the previous indentation on autoindenting
- "set list " Show whitespaces
- set splitright
- set history=200 " Remember more commands and search history
- set undolevels=100 " Use more levels of undo
- set hlsearch " Highlight searches
- set ignorecase " Ignore case when searching
- set smartcase " Case-sensitive when searching pattern contains uppercase
- set incsearch " Show search matches as you type"
- set showmatch " Show matching parenthesis
- set visualbell " Don't beep
- set noerrorbells " Don't beep
- "set laststatus=2 " Enable status line
- set backspace=indent,eol,start " Allow backspacing over everything in INSERT mode
- "set title " Change the terminal's title
- set wildignore=*.swp,*.bak,*.pyc,*.class
- set diffopt+=vertical
- highlight LineNr ctermfg=White guifg=White
- " ------------ Open last opened line -----------------------------------------
- if has("autocmd")
- au BufReadPost * if line("'\"") > 0 && line("'\"")<= line("$")
- \| exe "normal g'\"" | endif
- endif
- let g:ackprg = 'ag --nogroup --column'
- cnoreabbrev Ack Ack!
- nnoremap <Leader>a :Ack!<Space>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement