-
-
Save ur4ltz/ae47ac92cc75b5d714965351978c70c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let perl_sub_signatures = 1 | |
set modeline | |
set incsearch | |
set encoding=utf-8 | |
set splitbelow | |
set backspace=indent,eol,start | |
set updatetime=100 | |
set wildmenu | |
filetype plugin indent on | |
let mapleader = ' ' | |
set nu rnu | |
set fillchars+=vert:\ " This is not a trailing whitespace | |
hi VertSplit ctermbg=NONE | |
set tabstop=4 shiftwidth=4 smarttab | |
set colorcolumn=100 | |
set mouse=nrc | |
set title | |
set guioptions=+a | |
if has('clipboard') || has('xterm_clipboard') | |
set clipboard=unnamedplus | |
endif | |
syntax on | |
set completeopt=menuone,preview,noinsert,noselect | |
set undofile | |
set undodir=~/.vim/undodir | |
set exrc | |
call plug#begin('~/.vim/plugged') | |
Plug 'gosukiwi/vim-atom-dark' | |
Plug 'maralla/completor.vim' | |
Plug 'davidhalter/jedi-vim', { 'for': 'python' } | |
Plug 'williamjameshandley/vimteractive' | |
Plug 'airblade/vim-gitgutter' | |
Plug 'ekalinin/Dockerfile.vim', { 'for': 'dockerfile' } | |
Plug 'neilhwatson/vim_cf3' | |
Plug 'itchyny/lightline.vim' | |
Plug 'tpope/vim-surround' | |
Plug 'zah/nim.vim', { 'for': 'nim' } | |
Plug 'gabrielelana/vim-markdown', { 'for': 'markdown' } | |
Plug 'neomake/neomake' | |
Plug 'tpope/vim-fugitive' | |
Plug 'GoldsteinE/current-func-info.vim' | |
Plug 'tpope/vim-characterize' | |
Plug 'mattn/emmet-vim', { 'for': [ 'html', 'htmldjango' ] } | |
Plug 'kshenoy/vim-signature' | |
Plug 'RRethy/vim-illuminate' | |
Plug 'mhinz/vim-startify' | |
Plug 'editorconfig/editorconfig-vim' | |
Plug 'Chiel92/vim-autoformat' | |
Plug 'tweekmonster/startuptime.vim' | |
Plug 'wincent/command-t', { | |
\ 'do': 'cd ruby/command-t/ext/command-t && ruby extconf.rb && make' | |
\ } | |
call plug#end() | |
if has('termguicolors') | |
set termguicolors | |
colorscheme atom-dark | |
hi CursorLine term=NONE cterm=NONE | |
hi SpellCap guibg=#383900 | |
hi SpellBad guibg=#661400 | |
hi Pmenu guibg=#2d3135 guifg=#a0d1d9 | |
hi PmenuSel guibg=#818890 | |
hi PmenuSbar guibg=#121315 | |
hi PmenuThumb guibg=#b1bfcc guifg=#66d9ef | |
hi NeomakeWarningSign guifg=#969900 guibg=#232526 | |
hi NeomakeErrorSign guifg=#991f00 guibg=#232526 | |
else | |
colorscheme atom-dark-256 | |
endif | |
hi VertSplit guifg=#455354 | |
hi GitGutterAdd guifg=#008c43 ctermfg=green guibg=#232526 ctermbg=248 | |
hi GitGutterDelete guifg=#8c0049 ctermfg=red guibg=#232526 ctermbg=248 | |
hi GitGutterChange guifg=#9a9918 ctermfg=yellow guibg=#232526 ctermbg=248 | |
hi Search cterm=NONE gui=NONE guifg=NONE guibg=#475F2C | |
hi IncSearch cterm=NONE gui=NONE guifg=NONE guibg=#627C4E | |
augroup vim_incsearch_hl | |
au! | |
au CmdlineEnter [/\?] :set hlsearch | |
au CmdlineLeave [/\?] :set nohlsearch | |
augroup END | |
let g:jedi#use_splits_not_buffers = 'right' | |
let g:jedi#popup_on_dot = 0 | |
let g:pymode_rope = 0 | |
if executable('pyls') | |
let g:completor_filetype_map = {} | |
let g:jedi#completions_enabled = 0 | |
let g:completor_filetype_map.python = { 'ft': 'lsp', 'cmd': 'pyls'} | |
let g:completor_auto_trigger = 0 | |
function! Tab_Or_Complete() abort | |
" If completor is already open the `tab` cycles through suggested completions. | |
if pumvisible() | |
return "\<C-N>" | |
" If completor is not open and we are in the middle of typing a word then | |
" `tab` opens completor menu. | |
elseif col('.')>1 && strpart( getline('.'), col('.')-2, 3 ) =~ '^[[:keyword:][:ident:]\.]' | |
return "\<C-R>=completor#do('complete')\<CR>" | |
else | |
" If we aren't typing a word and we press `tab` simply do the normal `tab` | |
" action. | |
return "\<Tab>" | |
endif | |
endfunction | |
" Use `tab` key to select completions. Default is arrow keys. | |
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>" | |
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>" | |
" Use tab to trigger auto completion. Default suggests completions as you type. | |
let g:completor_auto_trigger = 0 | |
inoremap <expr> <Tab> Tab_Or_Complete() | |
endif | |
let g:Illuminate_delay = 50 | |
let g:Illuminate_ftHighlightGroups = { | |
\ 'python:blacklist': ['pythonInclude', 'pythonStatement', 'pythonAsync'] | |
\ } | |
let g:Illuminate_ftblacklist = ['debchangelog', 'vim'] | |
let g:user_emmet_expandabbr_key = '<C-y>y' | |
let g:formatters_python = ['black'] | |
let g:formatters_html = ['tidy_html'] | |
augroup py_ft | |
au! | |
autocmd BufNewFile,BufRead *.python3 set filetype=python | |
autocmd BufNewFile,BufRead *.python set filetype=python | |
augroup END | |
augroup nim_ft | |
au! | |
autocmd BufNewFile,BufRead *.nim set filetype=nim | |
augroup END | |
augroup py_indent | |
au! | |
autocmd FileType python set tabstop=4 shiftwidth=4 expandtab | |
augroup END | |
augroup web_indent | |
au! | |
autocmd FileType javascript set tabstop=2 shiftwidth=2 expandtab | |
autocmd FileType css set tabstop=2 shiftwidth=2 expandtab | |
autocmd FileType html set tabstop=2 shiftwidth=2 expandtab | |
autocmd FileType django set tabstop=2 shiftwidth=2 expandtab | |
autocmd FileType htmldjango set tabstop=2 shiftwidth=2 expandtab | |
augroup END | |
augroup cfe_fold | |
au! | |
autocmd FileType cf3 set nofoldenable | |
augroup END | |
augroup preview_close | |
au! | |
autocmd CompleteDone * silent! pclose | |
augroup END | |
function! CheckNeomakeSkip() | |
for linenr in range(5) | |
if match(getline(linenr), 'neomake: skip') != -1 | |
\ || match(getline(line('$') - linenr), 'neomake: skip') != -1 | |
silent NeomakeDisableBuffer | |
NeomakeClean | |
return | |
endif | |
endfor | |
let [disabled, source] = neomake#config#get_with_source('disabled', 0) | |
if disabled && source ==# 'buffer' | |
silent NeomakeEnableBuffer | |
Neomake | |
endif | |
endfunction | |
augroup neomake_skip | |
au! | |
autocmd BufEnter,InsertLeave,TextChanged * call CheckNeomakeSkip() | |
augroup END | |
set laststatus=2 | |
set noshowmode | |
function! LightLineCurrentFunc() | |
if &ft !=# 'c' | |
return cfi#format("%s", "") | |
endif | |
return "" | |
endfunction | |
let g:lightline = { | |
\ 'colorscheme': 'wombat', | |
\ 'active': { | |
\ 'left': [ [ 'mode', 'paste' ], | |
\ [ 'readonly', 'filename', 'modified', 'gitbranch', 'current_func' ] ] | |
\ }, | |
\ 'component_function': { | |
\ 'gitbranch': 'fugitive#head', | |
\ 'current_func': 'LightLineCurrentFunc' | |
\ } | |
\ } | |
let g:lightline.separator = { | |
\ 'left': nr2char(57520), 'right': nr2char(57522) | |
\ } | |
let g:lightline.subseparator = { | |
\ 'left': nr2char(57521), 'right': nr2char(57523) | |
\ } | |
let g:markdown_enable_spell_checking = 0 | |
let g:markdown_enable_conceal = 0 | |
let g:SignatureMarkTextHLDynamic = 1 | |
let g:SignatureMarkerTextHLDynamic = 1 | |
let g:neomake_highlight_lines = 1 | |
let g:neomake_highlight_columns = 0 | |
let g:neomake_shellcheck_args = ['-fgcc'] | |
let g:neomake_python_enabled_makers = ['python', 'flake8', 'mypy', 'pylint'] | |
let g:neomake_error_sign = { | |
\ 'text': nr2char(10007), | |
\ 'texthl': 'NeomakeErrorSign' | |
\ } | |
let g:neomake_warning_sign = { | |
\ 'text': nr2char(10071), | |
\ 'texthl': 'NeomakeWarningSign' | |
\ } | |
let g:neomake_info_sign = { | |
\ 'text': nr2char(10148), | |
\ 'texthl': 'NeomakeInfoSign' | |
\ } | |
let g:neomake_message_sign = { | |
\ 'text': nr2char(10148), | |
\ 'texthl': 'NeomakeMessageSign' | |
\ } | |
call neomake#configure#automake('nrwi', 200) | |
inoremap jk <Esc> | |
nnoremap <leader>gb :Gblame<Return> | |
nnoremap <leader>gs :Gstatus<Return> | |
nnoremap <leader>gc :Gcommit<Return> | |
nnoremap <leader>q :lwindow<Return> | |
xnoremap <silent> <leader><Space> :Autoformat<Return> | |
nnoremap <silent> <leader><Space> :Autoformat<Return> | |
xnoremap & :s<Up><Return> | |
nnoremap <Leader>= :w !git diff --no-index -- % -<Return> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment