Skip to content

Instantly share code, notes, and snippets.

@Mathew
Created December 20, 2016 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Mathew/8862fad7d15cdffc9ebeb4129f3f45c0 to your computer and use it in GitHub Desktop.
Save Mathew/8862fad7d15cdffc9ebeb4129f3f45c0 to your computer and use it in GitHub Desktop.
Intellij vimrc file for ideavim
let mapleader = ","
set backspace=indent,eol,start " backspace through everything in insert mode
"" Window Management.
" Thou shalt match tmux.
set splitbelow
set splitright
" | to split vertically.
nnoremap <Leader>\| <C-w>v
" - to split horizontally.
nnoremap <Leader>- <C-w>s
"" Set relative line numbers
set rnu nu
" NO BELLS
set visualbell
set mousehide " Hide mouse after chars typed
set mouse=a " Mouse in all modes
"" Searching
set hlsearch " highlight matches
set incsearch " incremental searching
set ignorecase " searches are case insensitive...
set smartcase " ... unless they contain at least one capital letter
set showmatch " and show matches
" clear searches
nnoremap <Leader><Space> :noh<cr>
" Use OS X clipboard
highlight Normal ctermfg=grey ctermbg=black
set clipboard=unnamed
" easy window navigation
nnoremap <c-l> <c-w>l
nnoremap <c-j> <c-w>j
nnoremap <c-h> <c-w>h
nnoremap <c-k> <c-w>k
" code navigation
nnoremap <Leader>d :action GotoImplementation<cr>
nnoremap <Leader>D :action Back<cr>
nnoremap <Leader>p :action GotoSymbol<cr>
nnoremap <Leader>P :action GotoFile<cr>
nnoremap <Leader>T :action GotoTest<cr>
nnoremap <Leader>t :action FileStructurePopup<cr>
nnoremap <Leader>b :action ShowNavBar<cr>
nnoremap <Leader>l :action RecentFiles<cr>
nnoremap <Leader>u :action ShowUsages<cr>
nnoremap <Leader>h :action TypeHierarchy<cr>
nnoremap <Leader>f :action FindInPath<cr>
" Docs
nnoremap <Leader>k :action QuickJavaDoc<cr>
" Running Configs
nnoremap <Leader>Br :action Rerun<cr>
nnoremap <Leader>BR :action RunConfiguration<cr>
nnoremap <Leader>Bc :action RunClass<cr>
" Expand/Collapse
nnoremap <space> :action CollapseSelection<cr>
" code refactoring
nnoremap <Leader>r :action Refactorings.QuickListPopupAction<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment