2021-05-09 19:04:25 -05:00
|
|
|
" randomuser's vimrc
|
2022-03-31 12:05:22 -05:00
|
|
|
" vim-plug {{{
|
|
|
|
call plug#begin()
|
|
|
|
Plug 'honza/vim-snippets'
|
|
|
|
Plug 'sirver/ultisnips'
|
2022-06-07 23:43:31 -05:00
|
|
|
Plug 'tridactyl/vim-tridactyl'
|
|
|
|
Plug 'chrisbra/csv.vim'
|
|
|
|
Plug 'trapd00r/vimpoint'
|
2022-03-31 12:05:22 -05:00
|
|
|
cal plug#end()
|
|
|
|
" }}}
|
2021-05-09 19:04:25 -05:00
|
|
|
|
2022-03-31 12:05:22 -05:00
|
|
|
" misc {{{
|
2021-05-09 19:04:25 -05:00
|
|
|
nnoremap ; :
|
|
|
|
nnoremap : ;
|
2022-03-30 20:55:31 -05:00
|
|
|
let mapleader = " "
|
2022-03-31 12:05:22 -05:00
|
|
|
set nocompatible
|
|
|
|
" }}}
|
2022-03-30 20:55:31 -05:00
|
|
|
|
2022-03-31 12:05:22 -05:00
|
|
|
" defined settings {{{
|
2021-05-09 19:04:25 -05:00
|
|
|
set number
|
2022-03-31 12:05:22 -05:00
|
|
|
set foldmethod=marker
|
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-06-07 23:43:31 -05:00
|
|
|
set title
|
2022-03-30 20:55:31 -05:00
|
|
|
colorscheme earth
|
2022-03-31 12:05:22 -05:00
|
|
|
" }}}
|
2022-03-30 20:55:31 -05:00
|
|
|
|
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
|
2022-03-31 12:05:22 -05:00
|
|
|
nnoremap <Leader>ke :e ~/.config/nvim/init.vim <CR>ggzR/shortcuts<CR>z<CR>
|
2022-03-30 21:45:56 -05:00
|
|
|
" 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-31 12:05:22 -05:00
|
|
|
" autocmds {{{
|
2022-03-30 20:55:31 -05:00
|
|
|
au Filetype python setl et ts=4 sw=4
|
2022-03-31 12:05:22 -05:00
|
|
|
" }}}
|
2021-05-09 19:04:25 -05:00
|
|
|
|
2022-03-31 12:05:22 -05:00
|
|
|
" statusline {{{
|
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-31 12:05:22 -05:00
|
|
|
" }}}
|
2022-03-30 21:45:56 -05:00
|
|
|
|
2022-03-31 12:05:22 -05:00
|
|
|
" netrw {{{
|
2022-03-30 21:45:56 -05:00
|
|
|
let g:netrw_banner=0
|
2022-03-31 12:05:22 -05:00
|
|
|
" }}}
|
|
|
|
|
|
|
|
" ultisnips {{{
|
|
|
|
let g:UltiSnipsExpandTrigger = '<tab>'
|
|
|
|
let g:UltiSnipsJumpForwardTrigger="<c-b>"
|
|
|
|
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
|
|
|
|
" }}}
|