Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set encoding=utf-8
- set laststatus=2
- set number
- set tabstop=4
- set shiftwidth=4
- set softtabstop=4
- set expandtab
- set colorcolumn=+1
- set cursorline
- set ignorecase
- set smartcase
- set showmatch
- set hlsearch
- set gdefault
- set virtualedit=block
- " Buffers, Backup & Co
- set undodir=~/.vim/tmp/undo//
- set backupdir=~/.vim/tmp/backup//
- set directory=~/.vim/tmp/swap//
- set backup
- set noswapfile
- set ruler
- set history=10000
- set undofile
- set undoreload=10000
- set title
- set autoindent
- set autoread
- set lazyredraw
- set mouse=a
- " https://github.com/ryanoasis/vim-devicons
- set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Plus\ Nerd\ File\ Types\ 11
- "set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 10
- " https://github.com/lidashuang/colors-vim
- colorscheme molokai
- syntax on
- set t_Co=256
- inoremap <c-a> <esc>I
- inoremap <c-e> <esc>A
- " Return to the previously selected line in the file
- augroup line_return
- au!
- au BufReadPost *
- \ if line("'\"") > 0 && line("'\"") <= line("$") |
- \ execute 'normal! g`"zvzz' |
- \ endif
- augroup END
- " remove seach-highlights when pressing ,+<space>
- let mapleader=","
- noremap <leader><space> :noh<cr>: call clearmatches()<cr>
- " reload .vimrc on saving
- au BufWritePost .vimrc so ~/.vimrc
- " https://github.com/tpope/vim-pathogen
- execute pathogen#infect()
- call pathogen#infect('bundle/{}')
- " https://github.com/bubujka/emmet-vim
- " Enable in different mode
- let g:user_emmet_mode='n' "only enable normal mode functions.
- let g:user_emmet_mode='inv' "enable all functions, which is equal to
- let g:user_emmet_mode='a' "enable all function in all mode.
- " Enable just for html/css
- let g:user_emmet_install_global = 0
- autocmd FileType html,css EmmetInstall
- " Redefine trigger key
- "let g:user_emmet_leader_key='<C-Z>'
- " Adding custom snippets
- "let g:user_emmet_settings = webapi#json#decode(join(readfile(expand('~/.snippets_custom.json')), "\n"))
- " https://github.com/scrooloose/nerdtree
- autocmd vimenter * NERDTree
- autocmd StdinReadPre * let s:std_in=1
- autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
- map <C-n> :NERDTreeToggle<CR>
- let g:NERDTreeDirArrowExpandable = '▸'
- let g:NERDTreeDirArrowCollapsible = '▾'
- " https://github.com/tiagofumo/vim-nerdtree-syntax-highlight
- let g:NERDTreeFileExtensionHighlightFullName = 1
- let g:NERDTreeExtensionHighlightColor = {} "this line is needed to avoid error
- " https://github.com/itchyny/lightline.vim
- let g:lightline = {
- \ 'colorscheme': 'wombat',
- \ 'active': {
- \ 'left': [ [ 'mode', 'paste' ],
- \ [ 'fugitive', 'filename' ] ]
- \ },
- \ 'component_function': {
- \ 'fugitive': 'LightLineFugitive',
- \ 'readonly': 'LightLineReadonly',
- \ 'modified': 'LightLineModified',
- \ 'filename': 'LightLineFilename',
- \ 'filetype': 'MyFiletype',
- \ 'fileformat': 'MyFileformat'
- \ },
- \ 'separator': { 'left': '⮀', 'right': '⮂' },
- \ 'subseparator': { 'left': '⮁', 'right': '⮃' }
- \ }
- function! LightLineModified()
- if &filetype == "help"
- return ""
- elseif &modified
- return "+"
- elseif &modifiable
- return ""
- else
- return ""
- endif
- endfunction
- function! LightLineReadonly()
- if &filetype == "help"
- return ""
- elseif &readonly
- return "⭤"
- else
- return ""
- endif
- endfunction
- function! LightLineFugitive()
- if exists("*fugitive#head")
- let branch = fugitive#head()
- return branch !=# '' ? '⭠ '.branch : ''
- endif
- return ''
- endfunction
- function! LightLineFilename()
- return ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') .
- \ ('' != expand('%:t') ? expand('%:t') : '[No Name]') .
- \ ('' != LightLineModified() ? ' ' . LightLineModified() : '')
- endfunction
- function! MyFiletype()
- return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : ''
- endfunction
- function! MyFileformat()
- return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : ''
- endfunction
- " http://vimawesome.com/plugin/nginx-vim
- au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement