Ditch lightline and other plugins

main
Steffen Rademacker 7 years ago
parent a904509bfb
commit 1eff6ad74d

@ -1,26 +0,0 @@
call dein#add('Shougo/deoplete.nvim')
call dein#add('Shougo/neosnippet')
call dein#add('christoomey/vim-tmux-navigator')
call dein#add('cocopon/lightline-hybrid.vim')
call dein#add('editorconfig/editorconfig-vim')
call dein#add('haya14busa/incsearch.vim')
call dein#add('itchyny/lightline.vim')
call dein#add('junegunn/fzf', { 'merged': 0 })
call dein#add('jiangmiao/auto-pairs')
call dein#add('junegunn/fzf.vim', { 'depends': 'fzf' })
call dein#add('junegunn/gv.vim')
call dein#add('justinmk/vim-sneak')
call dein#add('maxbrunsfeld/vim-yankstack')
call dein#add('sheerun/vim-polyglot')
call dein#add('tpope/vim-commentary')
call dein#add('tpope/vim-fugitive')
call dein#add('tpope/vim-ragtag')
call dein#add('tpope/vim-repeat')
call dein#add('tpope/vim-surround')
call dein#add('tpope/vim-unimpaired')
call dein#add('tpope/vim-vinegar')
call dein#add('w0ng/vim-hybrid')
call dein#add('w0rp/ale')
call dein#add('webgefrickel/vim-snippets')
call dein#add('wellle/targets.vim')
call dein#add('wellle/tmux-complete.vim')

@ -8,7 +8,27 @@ set runtimepath+=~/.config/nvim/dein/repos/github.com/Shougo/dein.vim
" let dein handle all the plugins and bundles
call dein#begin(expand('~/.config/nvim/dein'))
call dein#add('Shougo/dein.vim')
source ~/.config/nvim/bundles.vim
call dein#add('Shougo/deoplete.nvim')
call dein#add('Shougo/neosnippet')
call dein#add('christoomey/vim-tmux-navigator')
call dein#add('editorconfig/editorconfig-vim')
call dein#add('junegunn/fzf', { 'merged': 0 })
call dein#add('junegunn/fzf.vim', { 'depends': 'fzf' })
call dein#add('junegunn/gv.vim')
call dein#add('maxbrunsfeld/vim-yankstack')
call dein#add('sheerun/vim-polyglot')
call dein#add('tpope/vim-commentary')
call dein#add('tpope/vim-fugitive')
call dein#add('tpope/vim-ragtag')
call dein#add('tpope/vim-repeat')
call dein#add('tpope/vim-surround')
call dein#add('tpope/vim-unimpaired')
call dein#add('tpope/vim-vinegar')
call dein#add('w0ng/vim-hybrid')
call dein#add('w0rp/ale')
call dein#add('webgefrickel/vim-snippets')
call dein#add('wellle/targets.vim')
call dein#add('wellle/tmux-complete.vim')
call dein#end()
filetype plugin indent on
@ -17,6 +37,7 @@ syntax on
" load the default config and mappings
source ~/.config/nvim/config.vim
source ~/.config/nvim/autocommands.vim
source ~/.config/nvim/statusline.vim
source ~/.config/nvim/keymappings.vim
source ~/.config/nvim/leaderkeys.vim
source ~/.config/nvim/plugins.vim

@ -4,36 +4,20 @@ let g:deoplete#enable_smart_case = 1
let g:deoplete#auto_complete_delay = 150
let g:deoplete#auto_completion_start_length = 4
inoremap <expr><C-h> deoplete#smart_close_popup().doorboy#map_backspace()
inoremap <expr><BS> deoplete#smart_close_popup().doorboy#map_backspace()
inoremap <expr><C-h> deoplete#smart_close_popup()."\<C-h>"
inoremap <expr><BS> deoplete#smart_close_popup()."\<C-h>"
inoremap <silent> <CR> <C-r>=<SID>deoplete_cr_function()<CR>
function! s:deoplete_cr_function() abort
return deoplete#close_popup() . "\<CR>"
endfunction
" fugitive + vimagit
" fugitive
nnoremap <silent> <leader>gs :Gstatus<CR><C-w>20+
nnoremap <silent> <leader>gd :Gvdiff<CR><C-w>20+
nnoremap <silent> <leader>gc :Gcommit<CR><C-w>20+
nnoremap <silent> <leader>gw :Gwrite<CR><C-w>20+
nnoremap <silent> <leader>gb :Gblame<CR><C-w>20+
nnoremap <silent> <leader>gm :Magit<CR>
" incsearch
let g:incsearch#auto_nohlsearch = 1
let g:incsearch#consistent_n_direction = 1
let g:incsearch#magic = '\v'
map / <Plug>(incsearch-forward)
map ? <Plug>(incsearch-backward)
map g/ <Plug>(incsearch-stay)
map n <Plug>(incsearch-nohl-n)
map N <Plug>(incsearch-nohl-N)
map * <Plug>(incsearch-nohl-*)
map # <Plug>(incsearch-nohl-#)
map g* <Plug>(incsearch-nohl-g*)
map g# <Plug>(incsearch-nohl-g#)
" neosnippet
let g:neosnippet#disable_runtime_snippets = { "_": 1 }
@ -46,12 +30,6 @@ imap <C-j> <Plug>(neosnippet_expand_or_jump)
smap <C-j> <Plug>(neosnippet_expand_or_jump)
xmap <C-j> <Plug>(neosnippet_expand_target)
" sneak
let g:sneak#use_ic_scs = 1
let g:sneak#map_netrw = 1
let g:sneak#s_next = 1
let g:sneak#streak = 1
" ale
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 0
@ -66,68 +44,7 @@ let g:ale_linters = {
" fzf
nnoremap <silent> <space>, :Files<cr>
nnoremap <silent> <space>. :Buffers<cr>
nnoremap <silent> <space>g :GFiles<cr>
nnoremap <silent> <space>c :GFiles?<cr>
nnoremap <silent> <space>l :Lines<cr>
nnoremap <silent> <space>a :Ag<cr>
nnoremap <silent> <space>r :History:<cr>
" lightline
let g:lightline = {
\ 'colorscheme': 'hybrid',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ],
\ 'right': [ [ 'lineinfo' ], [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component_function': {
\ 'modified': 'LightlineModified',
\ 'readonly': 'LightlineReadonly',
\ 'fugitive': 'LightlineFugitive',
\ 'filename': 'LightlineFilename',
\ 'fileformat': 'LightlineFileformat',
\ 'filetype': 'LightlineFiletype',
\ 'fileencoding': 'LightlineFileencoding',
\ 'mode': 'LightlineMode',
\ }
\ }
function! LightlineModified()
return &ft =~ 'help' ? '' : &modified ? 'ɱ' : &modifiable ? '' : 'ɯ'
endfunction
function! LightlineReadonly()
return &ft !~? 'help' && &readonly ? 'ɹ' : ''
endfunction
function! LightlineFilename()
return ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') .
\ (&ft == 'unite' ? unite#get_status_string() :
\ '' != expand('%:t') ? expand('%:t') : '[No Name]') .
\ (LightlineModified() != '' ? ' ' . LightlineModified() : '') .
\ (ALEGetStatusLine() != 'OK' ? ' - ' . ALEGetStatusLine() : '')
endfunction
function! LightlineFugitive()
if exists("*fugitive#head")
let _ = fugitive#head()
return strlen(_) ? 'ɓ '._ : ''
endif
return ''
endfunction
function! LightlineFileformat()
return winwidth(0) > 70 ? &fileformat : ''
endfunction
function! LightlineFiletype()
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : ''
endfunction
function! LightlineFileencoding()
return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : ''
endfunction
function! LightlineMode()
let fname = expand('%:t')
return winwidth(0) > 70 ? lightline#mode() : ''
endfunction

@ -0,0 +1,23 @@
function! GitBranch()
return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
endfunction
function! StatuslineGit()
let l:branchname = GitBranch()
return strlen(l:branchname) > 0?' '.l:branchname.' ':''
endfunction
set statusline=
set statusline+=%#PmenuSel#
set statusline+=%{StatuslineGit()}
set statusline+=%#LineNr#
set statusline+=\ %f
set statusline+=%m\
set statusline+=%=
set statusline+=%#CursorColumn#
set statusline+=\ %y
set statusline+=\ %{&fileencoding?&fileencoding:&encoding}
set statusline+=\[%{&fileformat}\]
set statusline+=\ %p%%
set statusline+=\ %l:%c
set statusline+=\
Loading…
Cancel
Save