Last active
July 30, 2022 11:45
-
-
Save sangoisanga/e682dc6285eedb43c62b51a9dffd2359 to your computer and use it in GitHub Desktop.
.ideavimrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source ~/.vimrc | |
| set clipboard+=ideaput | |
| set ideamarks | |
| set easymotion | |
| set ideajoin | |
| set idearefactormode=keep | |
| set surround | |
| set multiple-cursors | |
| set ReplaceWithRegister | |
| set highlightedyank | |
| let g:highlightedyank_highlight_duration = "1000" | |
| set argtextobj | |
| let g:argtextobj_pairs="[:],(:),<:>,::," | |
| "Press o to open the file in a new buffer or open/close directory. | |
| "Press t to open the file in a new tab. | |
| "Press i to open the file in a new horizontal split. | |
| "Press s to open the file in a new vertical split. | |
| "Press p to go to parent directory. | |
| "Press r to refresh the current directory. | |
| "Press m to launch NERDTree menu inside Vim. | |
| set NERDTree | |
| let g:NERDTreeMapActivateNode='l' | |
| let g:NERDTreeMapJumpParent='h' | |
| nmap gi <Action>(GotoImplementation) | |
| nmap gt <Action>(GotoTypeDeclaration) | |
| nmap gh <Action>(CallHierarchy) | |
| map [[ <Action>(MethodUp) | |
| map ]] <Action>(MethodDown) | |
| nmap ]c :action VcsShowNextChangeMarker<CR> | |
| nmap [c :action VcsShowPrevChangeMarker<CR> | |
| map w [w | |
| map e ]w | |
| map b [b | |
| map <leader>r <Action>(RenameElement) | |
| map <leader>o <Action>(FileStructurePopup) | |
| map <leader>p <Action>(SelectInProjectView) | |
| map <leader>a <Action>(Annotate) | |
| map <leader>b <Action>(Git.Branches) | |
| map <leader>t <Action>(Vcs.UpdateProject) | |
| map <leader>z <Action>(ToggleDistractionFreeMode) | |
| map <leader>d <Action>(QuickJavaDoc) | |
| map <leader>e <Action>(ShowErrorDescription) | |
| nnoremap ,t :action ActivateDebugToolWindow<CR> | |
| nnoremap ,d :action ChooseDebugConfiguration<CR> | |
| nnoremap ,f :action ChooseRunConfiguration<CR> | |
| nnoremap ,r :action Rerun<CR> | |
| "nnoremap ,r :action RunClass<CR> | |
| nnoremap ,b :action ToggleLineBreakpoint<CR> | |
| nnoremap ,k :action Stop<CR> | |
| " moving | |
| map <TAB> <Action>(PreviousTab) | |
| map <s-TAB> <Action>(NextTab) | |
| map <s-Space> <Action>(GotoNextError) | |
| map <c-TAB> <Action>(NextSplitter) | |
| map <c-\> <Action>(SplitVertically) | |
| map <c--> <Action>(SplitHorizontally) | |
| map <c-=> <Action>(UnsplitAll) | |
| nnoremap <c-x> :action HideAllWindows<CR> | |
| map <c-w>m <Action>(MaximizeEditorInSplit) | |
| map <c-o> <Action>(Back) | |
| map <c-i> <Action>(Forward) | |
| map <c-p> :action GotoFile<CR> | |
| map mc <Action>(CollapseRegion) | |
| map mo <Action>(ExpandRegion) | |
| map <c-m>c <Action>(CollapseAllRegions) | |
| map <c-m>o <Action>(ExpandAllRegions) | |
| map f <Plug>(easymotion-s) | |
| map F <Action>(AceDeclarationAction) | |
| nnoremap == :action ReformatCode <CR> | |
| map <c-n> :nohlsearch<CR> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " COMMON -------------------------------------------------------------- {{{ | |
| execute pathogen#infect() | |
| syntax on | |
| set encoding=utf-8 | |
| set hlsearch | |
| set incsearch | |
| set scrolloff=10 | |
| set ignorecase | |
| set visualbell | |
| set number | |
| set smartcase | |
| set showmode | |
| set clipboard=unnamed | |
| filetype on | |
| filetype plugin on | |
| filetype indent on | |
| autocmd BufWrite * set nobomb | |
| set nocompatible | |
| set smartindent | |
| set shiftwidth=4 | |
| set tabstop=4 | |
| set expandtab | |
| set nobackup | |
| set nowritebackup | |
| set showcmd | |
| set showmatch | |
| set history=1000 | |
| set wildmenu | |
| set wildmode=list:longest | |
| set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx | |
| map H ^ | |
| map L $ | |
| inoremap jk <Esc> | |
| " }}} | |
| " PLUGINS -------------------------------------------------------------- {{{ | |
| call plug#begin('~/.vim/plugged') | |
| Plug 'preservim/nerdtree', { 'on': 'NERDTreeFocus' } | |
| Plug 'chaoren/vim-wordmotion' | |
| Plug 'mg979/vim-visual-multi', {'branch': 'master'} | |
| Plug 'vim-airline/vim-airline' | |
| Plug 'fatih/vim-go' | |
| Plug 'doums/darcula' | |
| call plug#end() | |
| " backgroup stuff | |
| set background=dark | |
| colorscheme darcula | |
| set termguicolors | |
| " Have nerdtree ignore certain files and directories. | |
| let NERDTreeIgnore=['\.git$', '\.jpg$', '\.mp4$', '\.ogg$', '\.iso$', '\.pdf$', '\.pyc$', '\.odt$', '\.png$', '\.gif$', '\.db$'] | |
| " }}} | |
| " MAPPINGS -------------------------------------------------------------- {{{ | |
| let mapleader=" " | |
| nnoremap Y y$ | |
| nnoremap <leader>p :NERDTreeFocus<CR> | |
| nnoremap <c-j> <c-w>j | |
| nnoremap <c-k> <c-w>k | |
| nnoremap <c-h> <c-w>h | |
| nnoremap <c-l> <c-w>l | |
| " }}} | |
| " VIMSCRIPT -------------------------------------------------------------- {{{ | |
| " If Vim version is equal to or greater than 7.3 enable undofile. | |
| " This allows you to undo changes to a file even after saving it. | |
| if version >= 703 | |
| set undodir=~/.vim/backup | |
| set undofile | |
| set undoreload=10000 | |
| endif | |
| " This will enable code folding. | |
| " Use the marker method of folding. | |
| augroup filetype_vim | |
| autocmd! | |
| autocmd FileType vim setlocal foldmethod=marker | |
| augroup END | |
| let g:go_diagnostics_enabled = 0 | |
| let g:go_metalinter_enabled = [] | |
| let g:go_jump_to_error = 0 | |
| let g:go_fmt_command = "goimports" | |
| let g:go_def_mode='gopls' | |
| let g:go_info_mode='gopls' | |
| let g:go_auto_sameids = 0 | |
| let g:go_highlight_types = 1 | |
| let g:go_highlight_fields = 1 | |
| let g:go_highlight_functions = 1 | |
| let g:go_highlight_function_calls = 1 | |
| let g:go_highlight_operators = 1 | |
| let g:go_highlight_extra_types = 1 | |
| let g:go_highlight_build_constraints = 1 | |
| let g:go_highlight_generate_tags = 1 | |
| autocmd FileType go set number fo+=croq tw=100 | |
| autocmd Filetype go set makeprg=go\ build\ . | |
| " }}} | |
| " BASE -------------------------------------------------------------- {{{ | |
| " }}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment