Skip to content

Instantly share code, notes, and snippets.

@rnagasam
Created June 18, 2018 20:35
Show Gist options
  • Save rnagasam/91876a5ce01853858e6014be99360c4e to your computer and use it in GitHub Desktop.
Save rnagasam/91876a5ce01853858e6014be99360c4e to your computer and use it in GitHub Desktop.
vimrc
set nocompatible
inoremap jk <esc>
set scrolloff=999
set wildmenu
set path+=**
set number
set expandtab
set autoindent
filetype plugin indent on
syntax enable
set backspace=indent,eol,start
" disable automatic commenting on newline
autocmd Filetype * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
" view man pages using :Man
runtime ftplugin/man.vim
" switch to files director
autocmd BufEnter * silent! lcd %:p:h
let mapleader=","
nnoremap <leader>b :ls<CR>:b<Space>
" Searching set ignorecase smartcase
set hlsearch
nnoremap <leader><leader> :nohl<CR>
" Matching brackets
inoremap ( ()<Left>
inoremap <expr> ) strpart(getline('.'),col('.')-1,1) == ")" ? "\<Right>" : ")"
inoremap [ []<Left>
inoremap <expr> ] strpart(getline('.'),col('.')-1,1) == ")" ? "\<Right>" : ")"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment