speedie-nvim | Add new config
This commit is contained in:
parent
cd92310b79
commit
159e748613
|
@ -1,3 +1,6 @@
|
||||||
|
" speedie's neovim configuration
|
||||||
|
" purely for productivity, no bloat
|
||||||
|
|
||||||
syntax on
|
syntax on
|
||||||
|
|
||||||
set rnu
|
set rnu
|
||||||
|
@ -10,23 +13,54 @@ set autoindent
|
||||||
set expandtab
|
set expandtab
|
||||||
set noswapfile
|
set noswapfile
|
||||||
set nocursorline
|
set nocursorline
|
||||||
|
set laststatus=0
|
||||||
set undolevels=10000
|
set undolevels=10000
|
||||||
set softtabstop=4
|
set softtabstop=4
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
|
set spelllang=en_us
|
||||||
|
set spellsuggest=best,5
|
||||||
|
set foldmethod=indent
|
||||||
|
set laststatus=0
|
||||||
|
|
||||||
set termguicolors
|
set termguicolors
|
||||||
set t_Co=256
|
set t_Co=256
|
||||||
set t_ut=
|
set t_ut=
|
||||||
set background=dark
|
set background=dark
|
||||||
|
colorscheme elflord
|
||||||
|
|
||||||
|
fu! SaveSession()
|
||||||
|
execute 'mksession! ' . getcwd() . '/.session.nvim'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
fu! RestoreSession()
|
||||||
|
if argc() == 0
|
||||||
|
if filereadable(getcwd() . '/.session.nvim')
|
||||||
|
execute 'so ' . getcwd() . '/.session.nvim'
|
||||||
|
if bufexists(1)
|
||||||
|
for l in range(1, bufnr('$'))
|
||||||
|
if zufwinnr(l) == -1
|
||||||
|
exec 'sbuffer ' . l
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endif
|
||||||
|
|
||||||
|
silent execute '!rm -f ' . getcwd() . '/.session.nvim'
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
autocmd BufReadPre *.md set spell
|
autocmd BufReadPre *.md set spell
|
||||||
autocmd BufWritePre * %s/\s\+$//e
|
autocmd BufWritePre * %s/\s\+$//e
|
||||||
autocmd BufWritePre * %s/\t/ /e
|
autocmd BufWritePre * %s/\t/ /e
|
||||||
|
autocmd BufWritePre Makefile %s/ /\t/e
|
||||||
|
autocmd VimLeave * call SaveSession()
|
||||||
|
autocmd VimEnter * nested call RestoreSession()
|
||||||
|
|
||||||
highlight Normal ctermfg=grey ctermbg=lightgray
|
highlight Normal ctermfg=grey ctermbg=lightgray guifg=#ffffff guibg=#222222
|
||||||
hi SpellBad guisp=red gui=undercurl guifg=NONE guibg=NONE ctermfg=NONE ctermbg=NONE term=underline cterm=undercurl
|
highlight Folded ctermfg=grey ctermbg=lightgray guifg=#afeeee guibg=#333333
|
||||||
hi SpellCap guisp=yellow gui=undercurl guifg=NONE guibg=NONE ctermfg=NONE ctermbg=NONE term=underline cterm=undercurl
|
highlight SpellBad guisp=red gui=undercurl guifg=none guibg=none ctermfg=none ctermbg=none term=underline cterm=undercurl
|
||||||
|
highlight SpellCap guisp=yellow gui=undercurl guifg=none guibg=none ctermfg=none ctermbg=none term=underline cterm=undercurl
|
||||||
|
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
|
@ -39,6 +73,14 @@ nnoremap <C-w> :vsplit<cr>
|
||||||
nnoremap <C-q> :only<cr>
|
nnoremap <C-q> :only<cr>
|
||||||
nnoremap <C-t> :term<cr>
|
nnoremap <C-t> :term<cr>
|
||||||
|
|
||||||
|
nnoremap <F2> :set spell!<cr>
|
||||||
|
nnoremap <F3> :set spelllang=en_us<cr>
|
||||||
|
nnoremap <F4> :set spelllang=sv_se<cr>
|
||||||
|
nnoremap <F7> :silent execute '!setxkbmap us'<cr>
|
||||||
|
nnoremap <F8> :silent execute '!setxkbmap se'<cr>
|
||||||
|
nnoremap <C-e> [s1z=
|
||||||
|
nnoremap <C-r> 1z=
|
||||||
|
|
||||||
nnoremap H :vertical resize -10<cr>
|
nnoremap H :vertical resize -10<cr>
|
||||||
nnoremap J :resize -10<cr>
|
nnoremap J :resize -10<cr>
|
||||||
nnoremap K :resize +10<cr>
|
nnoremap K :resize +10<cr>
|
||||||
|
|
|
@ -4,7 +4,7 @@ if [ -e "$HOME/.config/nvim" ]; then
|
||||||
rm -rf .config/nvim
|
rm -rf .config/nvim
|
||||||
mkdir -p .config
|
mkdir -p .config
|
||||||
cp -r $HOME/.config/nvim .config/
|
cp -r $HOME/.config/nvim .config/
|
||||||
rm -rf .config/nvim/vimdata
|
rm -rf .config/nvim/vimdata .config/nvim/.session.nvim
|
||||||
|
|
||||||
git add .config/* commit.sh install.sh
|
git add .config/* commit.sh install.sh
|
||||||
git commit -a -m "speedie-nvim | Add new config"
|
git commit -a -m "speedie-nvim | Add new config"
|
||||||
|
|
Loading…
Reference in a new issue