dot_testing/nvim/init.vim

52 lines
1.1 KiB
VimL

" randomuser's vimrc
nnoremap ; :
nnoremap : ;
let mapleader = " "
" defined settings
set number
set encoding=utf8
set list
set lcs=tab:->,trail:_,eol:^
set clipboard=unnamedplus
set spell
set spelllang=en_us
colorscheme earth
" shortcuts {{{
" toggle line numbers and listchars
nnoremap <Leader>ym :set number!<CR>:set list!<CR>
" weather
nnoremap <Leader>w :!curl -s wttr.in/?0T<CR>
" vimrc thing
nnoremap <Leader>rr :source ~/.config/nvim/init.vim<CR>
nnoremap <Leader>re :edit ~/.config/nvim/init.vim<CR>
" show the file explorer
nnoremap <Leader>fs :Lexplore<CR>
" show the shortcuts in the vimrc
nnoremap <Leader>ke :e ~/.config/nvim/init.vim <CR>gg/" shortcuts<CR>zt
" jk to escape insert mode
inoremap jk <esc>
inoremap <esc> <esc>:echo "use jk instead!"<CR>2gsi
" go back to the previous error, then correct
inoremap <C-d> <c-g>u<Esc>[s1z=`]a<c-g>u
inoremap <C-s> <Esc>zgi
nnoremap <C-s> zg
" }}}
" autocmds
au Filetype python setl et ts=4 sw=4
" statusline
set statusline=%f
set statusline+=\
set statusline+=%r%m%q
set statusline+=%=
set statusline+=%y\ %B\ %l:%c:%p
" netrw
let g:netrw_banner=0