Skip to content

Instantly share code, notes, and snippets.

@asilvadesigns
Created March 24, 2023 14:05
Show Gist options
  • Save asilvadesigns/8922c9ec1c6b2302b9b7c15228ec8412 to your computer and use it in GitHub Desktop.
Save asilvadesigns/8922c9ec1c6b2302b9b7c15228ec8412 to your computer and use it in GitHub Desktop.
.ideavimrc
" plugins
set exchange
set highlightedyank
set ideajoin
set ignorecase
set incsearch
set multiple-cursors
set surround
set NERDTree
" use system clipboard
set clipboard+=unnamed
" relative number line
set nu rnu
" normal mode mappings
let mapleader=","
nnoremap <leader><space> :action ShowNavBar<cr>
nnoremap <leader>a :action GotoAction<cr>
nnoremap <leader>b :action ShowBookmarks<cr>
nnoremap <leader>c :action GotoClass<cr>
nnoremap <leader>e :action RecentFiles<cr>
nnoremap <leader>f :action GotoFile<cr>
nnoremap <leader>l :action RecentLocations<cr>
nnoremap <leader>m :action ReformatWithPrettierAction<cr>
nnoremap == :action ReformatWithPrettierAction<cr>
nnoremap <leader>rn :action RenameElement<cr>
nnoremap <leader>s :action SaveAll<cr>
nnoremap <leader>t :action ActivateTerminalToolWindow<cr>
nnoremap <leader>u :action EmmetUpdateTag<cr>
nnoremap <leader>j :action SelectInProjectView<cr>
nnoremap ge :action ShowErrorDescription<cr>
nnoremap gh :action QuickJavaDoc<cr>
nnoremap gi :action GotoImplementation<cr>
nnoremap gu :action ShowUsages<cr>
nnoremap <leader>ne :action GotoNextError<cr>
nnoremap <leader>pe :action GotoPreviousError<cr>
" nnoremap <leader>nc :action EmmetUpdateTag<cr>
" nnoremap <leader>pc :action EmmetUpdateTag<cr>
nnoremap <c-h> <c-w>h
nnoremap <c-j> <c-w>j
nnoremap <c-k> <c-w>k
nnoremap <c-l> <c-w>l
nnoremap ; :action AceAction<CR>
"nnoremap ; :action AceWordAction<CR>
" insert mode mappings
inoremap <c-h> <c-o>I
inoremap <c-l> <c-o>A
inoremap <c-u> <esc>v0c
inoremap kj <esc>
" visual mode mappings
vnoremap A :action EditorAddCaretPerSelectedLine<cr>
@asilvadesigns
Copy link
Author

These are exported from Preferences > Editor > Vim

sethandler <C-A> a:vim
sethandler <C-B> a:vim
sethandler <C-D> a:vim
sethandler <C-E> a:vim
sethandler <C-F> a:vim
sethandler <C-G> a:vim
sethandler <C-H> a:vim
sethandler <C-I> a:vim
sethandler <C-J> a:vim
sethandler <C-K> a:vim
sethandler <C-L> a:vim
sethandler <C-M> a:vim
sethandler <C-N> a:ide
sethandler <C-O> a:vim
sethandler <C-P> a:vim
sethandler <C-R> a:vim
sethandler <C-S> a:vim
sethandler <C-T> a:vim
sethandler <C-V> a:vim
sethandler <C-W> a:vim
sethandler <C-Y> a:ide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment