Skip to content

Instantly share code, notes, and snippets.

@spiderman-idog
Last active August 29, 2022 01:21
Show Gist options
  • Save spiderman-idog/69ed3f6a68f378ff6fcaf6346c9dd2cf to your computer and use it in GitHub Desktop.
Save spiderman-idog/69ed3f6a68f378ff6fcaf6346c9dd2cf to your computer and use it in GitHub Desktop.
For a weekend, I decided to challenge myself, and finally learn how to use vim, this is my .vimrc after that
syntax on
noremap j gj
noremap k gk
noremap <Up> gk
noremap <Down> gj
imap <silent> <Down> <C-o>gj
imap <silent> <Up> <C-o>gk
vmap <C-c> "+yi
let g:better_whitespace_enabled=0
let g:strip_whitespace_on_save=1
"I don't care, I want control s as save"
noremap <silent><c-s> :<c-u>update<cr>
vnoremap <silent><c-s> <c-c>:update<cr>gv
inoremap <silent><c-s> <c-o>:update<cr>
call plug#begin()
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
Plug 'sheerun/vim-polyglot'
Plug 'NLKNguyen/papercolor-theme'
Plug 'Valloric/YouCompleteMe'
Plug 'junegunn/vim-plug'
call plug#end()
let g:PaperColor_Theme_Options = {
\ 'theme': {
\ 'default.light': {
\ 'override' : {
\ 'cursor_bg' : ["#005f87", "255"],
\ 'color04' : ["#005f87", "255"]
\ }
\ }
\ }
\ }
set cursorline
set number
set laststatus=2
set background=light
colorscheme PaperColor
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
set nocompatible
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment