Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " omni's vimrc file
- " git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
- " Vundle
- " --------------
- set nocompatible
- filetype off
- " set the runtime path to include Vundle and initialize
- set rtp+=~/.vim/bundle/Vundle.vim
- call vundle#begin()
- " alternatively, pass a path where Vundle should install plugins
- "call vundle#begin('~/some/path/here')
- " let Vundle manage Vundle, required
- Plugin 'VundleVim/Vundle.vim'
- " plugins list
- " youcompleteme
- Plugin 'Valloric/YouCompleteMe'
- " light bar
- Plugin 'itchyny/lightline.vim'
- " emmet
- Plugin 'mattn/emmet-vim'
- " surround
- Plugin 'tpope/vim-surround'
- " nerdtree
- Plugin 'scrooloose/nerdtree'
- " gitgutter
- Plugin 'airblade/vim-gitgutter'
- " ctrlp
- Plugin 'ctrlpvim/ctrlp.vim'
- " vim commentary
- Plugin 'tpope/vim-commentary'
- " fugitive
- Plugin 'tpope/vim-fugitive'
- " searchindex
- Plugin 'google/vim-searchindex'
- " searchcomplete
- Plugin 'vim-scripts/SearchComplete'
- " goyo
- Plugin 'junegunn/goyo.vim'
- " markdown
- Plugin 'gabrielelana/vim-markdown'
- " auto-pair
- Plugin 'jiangmiao/auto-pairs'
- " syntax check
- Plugin 'vim-syntastic/syntastic'
- " java complete
- Plugin 'artur-shaik/vim-javacomplete2'
- " All of your Plugins must be added before the following line
- call vundle#end()
- " --------------
- " config
- " ---------------
- " search parameters
- set incsearch
- set ignorecase
- set smartcase
- set hlsearch
- filetype plugin indent on
- syntax on
- " To save, ctrl-s.
- nmap <c-s> :w<CR>
- imap <c-s> <Esc>:w<CR>a
- " To save and quit, ctrl-x
- nmap <c-x> :x<CR>
- imap <c-x> <Esc>:x<CR>a
- " colorscheme
- colorscheme onedark
- " if file is markdown -> no spellcheck (ugly red thing)
- autocmd BufNewFile,BufRead *.md set nospell
- " execute C code
- map <F8> :w <CR> :!gcc % && ./a.out <CR>
- " shortcut for split windows
- nnoremap <C-h> <C-w>h
- nnoremap <C-j> <C-w>j
- nnoremap <C-k> <C-w>k
- nnoremap <C-l> <C-w>l
- " set foldmethod
- " set foldmethod=indent
- " Auto reload changed files
- set autoread
- " Automatically indent when adding a curly bracket, etc.
- set smartindent
- set autoindent
- " Tabs should be converted to a group of 4 spaces.
- " This is the official Python convention
- " http://www.python.org/dev/peps/pep-0008/
- set shiftwidth=4
- set tabstop=4
- set noexpandtab
- set smarttab
- " Show autocomplete menus.
- set wildmenu
- " Error bells are displayed visually.
- " set visualbell
- " --------------
- " plugins config
- " --------------
- " nerdtree config
- map <C-n> :NERDTreeToggle<CR>
- " lightline config
- set laststatus=2
- set noshowmode
- "\ 'lineinfo': ' %3l:%-2v',
- let g:lightline = {
- \ 'colorscheme': 'one',
- \ 'active': {
- \ 'left': [ [ 'mode', 'paste' ],
- \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
- \ },
- \ 'component_function': {
- \ 'gitbranch': 'fugitive#head',
- \ 'lineinfo': 'GetLines',
- \ 'fileformat': 'LightlineFileformat',
- \ 'filetype': 'LightlineFiletype',
- \ },
- \ 'component': {
- \ },
- \ }
- let g:lightline.separator = {
- \ 'left': '', 'right': ''
- \}
- let g:lightline.subseparator = {
- \ 'left': '', 'right': ''
- \}
- let g:lightline.tabline = {
- \ 'left': [ ['tabs'] ],
- \ 'right': [ ['close'] ]
- \ }
- set showtabline=2 " Show tabline
- set guioptions-=e " Don't use GUI tabline
- function! GetLines()
- return line('.') . ":" . col('.') . "/" . line('$')
- endfunction
- function! LightlineFileformat()
- return winwidth(0) > 70 ? &fileformat : ''
- endfunction
- function! LightlineFiletype()
- return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype : 'no ft') : ''
- endfunction
- " ycm
- let g:ycm_autoclose_preview_window_after_completion = 1
- " ctrlp
- let g:ctrlp_map = '<c-p>'
- let g:ctrlp_cmd = 'CtrlP'
- " markdown
- let g:markdown_fenced_languages = ['html', 'python', 'bash=sh', 'java', 'c', 'javascript']
- " java complete
- autocmd FileType java setlocal omnifunc=javacomplete#Complete
- " --------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement