Skip to content

Instantly share code, notes, and snippets.

Created January 21, 2022 00:15
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
set nocompatible
filetype plugin indent on
syntax on
call plug#begin()
Plug 'doums/darcula'
Plug 'ap/vim-css-color'
Plug 'tpope/vim-commentary'
Plug 'neoclide/coc.nvim', {'branch': 'master', 'do': 'yarn install --frozen-lockfile'}
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'ziglang/zig.vim'
call plug#end()
colorscheme darcula
"""""""""""" Key Map
imap jj <Esc>
" shortcut to save
nnoremap zz :update<cr>
set pastetoggle=<F2>
set clipboard=unnamed
nmap <CR> o<Esc>
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
"inoremap <up> <nop>
"inoremap <down> <nop>
"inoremap <left> <nop>
"inoremap <right> <nop>
"""""""""""" General
let mapleader = ","
set nowrap " don't wrap lines
set backspace=indent,eol,start " allow backspacing over everything in insert mode
set backspace=2 " make backspace work like most other apps
set autoindent " always set autoindenting on
set smartindent
set copyindent " copy the previous indentation on autoindenting
"Setting related to tab
set tabstop=4 shiftwidth=4 expandtab
set softtabstop=4 " makes the spaces feel like real tabs
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
"Search related conf also look ~/.vim/vimrc/search-keybindings.vim
set showmatch " set show matching parenthesis
set ignorecase " ignore case when searching
set smartcase " ignore case if search pattern is all lowercase,
set nolazyredraw " don't redraw while executing macros
set hlsearch " highlight search terms
set incsearch " show search matches as you type
set history=1000 " remember more commands and search history
set undolevels=1000 " use many muchos levels of undo
set wildignore=*.swp,*.bak,*.pyc,*.class
set title " change the terminal's title
set visualbell " don't beep
set noerrorbells " don't beep
set scrolloff=7 "when jumping makes at least 7 lines from top and bottom
set mouse=a
" neovide
let g:neovide_cursor_animation_length=0.01
let g:neovide_cursor_trail_length=0.0
set guifont=Meslo\ LG\ L\ DZ:h14
" Terminal
if has('vim')
tnoremap <Esc> <C-\><C-n>
tnoremap <M-[> <Esc>
tnoremap <C-v><Esc> <Esc>
" CoC
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment