Skip to content

Instantly share code, notes, and snippets.

@wa008
wa008 / .vimrc
Last active May 13, 2025 06:47
[vimrc] Bracket and quote matching and automatic shifting
" How to use: append below code into your ~/.vimrc file
inoremap ( ()<LEFT> " ( -> ()
inoremap [ []<LEFT> " [ -> []
inoremap { {}<LEFT> " { -> {}
" shift right when input ) and current char is )
function! RemoveNextDoubleChar(char)
let next_char = getline(".")[col(".")] " get current char
if a:char == next_char
@wa008
wa008 / .vimrc
Last active May 13, 2025 06:43 — forked from simonista/.vimrc
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on