dot_testing/nvim/init.vim

52 lines
1.1 KiB
VimL
Raw Normal View History

2021-05-09 19:04:25 -05:00
" randomuser's vimrc
nnoremap ; :
nnoremap : ;
2022-03-30 20:55:31 -05:00
let mapleader = " "
" defined settings
2021-05-09 19:04:25 -05:00
set number
2022-03-30 20:55:31 -05:00
set encoding=utf8
2022-03-30 21:45:56 -05:00
set list
2022-03-30 20:55:31 -05:00
set lcs=tab:->,trail:_,eol:^
set clipboard=unnamedplus
2022-03-30 21:45:56 -05:00
set spell
set spelllang=en_us
2022-03-30 20:55:31 -05:00
colorscheme earth
2022-03-30 21:45:56 -05:00
" shortcuts {{{
" toggle line numbers and listchars
2022-03-30 20:55:31 -05:00
nnoremap <Leader>ym :set number!<CR>:set list!<CR>
2022-03-30 21:45:56 -05:00
" weather
2022-03-30 20:55:31 -05:00
nnoremap <Leader>w :!curl -s wttr.in/?0T<CR>
2022-03-30 21:45:56 -05:00
" vimrc thing
2022-03-30 20:55:31 -05:00
nnoremap <Leader>rr :source ~/.config/nvim/init.vim<CR>
nnoremap <Leader>re :edit ~/.config/nvim/init.vim<CR>
2022-03-30 21:45:56 -05:00
" 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
2022-03-30 20:55:31 -05:00
inoremap jk <esc>
inoremap <esc> <esc>:echo "use jk instead!"<CR>2gsi
2022-03-30 21:45:56 -05:00
" 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
" }}}
2021-05-09 19:04:25 -05:00
2022-03-30 20:55:31 -05:00
" autocmds
au Filetype python setl et ts=4 sw=4
2021-05-09 19:04:25 -05:00
2022-03-30 20:55:31 -05:00
" statusline
2021-05-09 19:04:25 -05:00
2022-03-30 20:55:31 -05:00
set statusline=%f
set statusline+=\
set statusline+=%r%m%q
set statusline+=%=
set statusline+=%y\ %B\ %l:%c:%p
2022-03-30 21:45:56 -05:00
" netrw
let g:netrw_banner=0