Skip to content

Instantly share code, notes, and snippets.

@kmurph73
Last active December 9, 2023 23:05
Show Gist options
  • Save kmurph73/3278519 to your computer and use it in GitHub Desktop.
Save kmurph73/3278519 to your computer and use it in GitHub Desktop.
my vimrc
set incsearch
set nocompatible " be iMproved, required
set ruler
syntax on
syntax enable
" turn off bell
set noerrorbells visualbell t_vb=
autocmd GUIEnter * set visualbell t_vb=
colorscheme darkblue
set complete-=i
set fdm=manual
set rtp+=/opt/homebrew/opt/fzf
"let g:yankring_max_element_length = 91804729
set noswapfile
" use k and j for insert mode okay?
inoremap kj <Esc>
" Vim plug configuration
source $HOME/.vim/plugs.vim
let mapleader=","
" remap ctrl-p to ctrl [
let g:ctrlp_map = '<c-0>'
" setup mru
noremap <silent> <c-m> :CtrlPMRU<CR>
" remap ctrlp
noremap <silent> <c-[> :CtrlP<CR>
" share clipboard
set clipboard=unnamed
" Edit the vimrc file
nmap <silent> ,ev :e $MYVIMRC<CR>
nmap <silent> ,sv :so $MYVIMRC<CR>
nmap <silent> ,eb :e $HOME/.vim/plugs.vim<CR>
nmap <silent> ,sb :so $HOME/.vim/plugs.vim<CR>
" toggle line numbers
nnoremap <F2> :set nonumber!<CR>
" Maps to make handling windows a bit easier
noremap <silent> <c-h> :wincmd h<CR>
noremap <silent> <c-j> :wincmd j<CR>
noremap <silent> <c-k> :wincmd k<CR>
noremap <silent> <c-l> :wincmd l<CR>
noremap <silent> <c-H> :1wincmd w<CR>
" remapd ctrl-p to ctrl [
let g:ctrlp_map = '<c-0>'
" ctrlp crap
let g:ctrlp_working_path_mode = 2
" setup mru
" noremap <silent> <c-m> :CtrlPMRU<CR>
" remap ctvlp
" noremap <silent> <c-[> :CtrlP<CR>
" Toggle the NERD Tree on an off with F7
nmap <F7> :NERDTreeToggle<CR>
" Whitespace stuff
set nowrap
set tabstop=2
set shiftwidth=2
set softtabstop=2
" Turn tabs into spaces
set expandtab
set list listchars=tab:\ \ ,trail:·
" Searching
set hlsearch
set ignorecase
set smartcase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment