dotfiles

config files and scripts
git clone git://git.hanetzok.net/dotfiles
Log | Files | Refs | README

ideavimrc (6207B)


      1 "" Base Settings
      2 "" ========================================================
      3 
      4 set scrolloff=10
      5 set linenumber
      6 set showmode
      7 set showcmd
      8 
      9 set smartcase
     10 set incsearch
     11 set hlsearch
     12 
     13 set visualbell
     14 
     15 " Use system clipboard
     16 set clipboard+=unnamed   
     17 
     18 let mapleader = " "
     19 
     20 
     21 "" Plugin Settings
     22 "" ========================================================
     23 
     24 set surround
     25 set highlightedyank
     26 set sneak
     27 set nerdtree
     28 
     29 " Easymotion settings
     30 set notimeout
     31 
     32 " Which-key settings
     33 set which-key
     34 let g:WhichKey_FontSize = 16
     35 let g:WhichKey_CommandColor = "#41ead4"
     36 let g:WhichKey_PrefixColor = "#f335b2"
     37 let g:WhichKey_SortOrder = "by_key_prefix_first"
     38 
     39 let g:WhichKeyDesc_leader = "<leader> Leader key"
     40 
     41 let g:WhichKeyDesc_leader = "<leader>x Open file explorer"
     42 
     43 let g:WhichKeyDesc_comment = "<leader>c Comment line"
     44 
     45 let g:WhichKeyDesc_fold = "<leader>z Folding"
     46 let g:WhichKeyDesc_fold_all = "<leader>zc Fold all regions"
     47 let g:WhichKeyDesc_unfold_all = "<leader>zo Unfold all regions"
     48 
     49 let g:WhichKeyDesc_window = "<leader>s Window splits"
     50 let g:WhichKeyDesc_window_split_vertically = "<leader>sv Split vertically"
     51 let g:WhichKeyDesc_window_split_horizontally = "<leader>sh Split horizontally"
     52 let g:WhichKeyDesc_window_split_unsplit = "<leader>su Unsplit"
     53 let g:WhichKeyDesc_window_split_move_editor = "<leader>sm Move editor to opposite tab group"
     54 
     55 
     56 let g:WhichKeyDesc_display = "<leader>d Display options"
     57 let g:WhichKeyDesc_zen_mode = "<leader>dz Toggle Zen mode"
     58 let g:WhichKeyDesc_df_mode = "<leader>dd Toggle Distraction-Free mode"
     59 let g:WhichKeyDesc_fullscreen = "<leader>df Toggle full screen"
     60 
     61 let g:WhichKeyDesc_action= "<leader>a Actions"
     62 let g:WhichKeyDesc_action_context_menu = "<leader>am Open context menu"
     63 let g:WhichKeyDesc_action_search = "<leader>as Open command modal"
     64 
     65 let g:WhichKeyDesc_file_quickLook = "<leader><leader> Recent files"
     66 
     67 let g:WhichKeyDesc_file_nav = "<leader>f File navigation"
     68 let g:WhichKeyDesc_file_nav_goto_file = "<leader>ff Go to file"
     69 let g:WhichKeyDesc_file_nav_goto_content = "<leader>fc Search for file content"
     70 let g:WhichKeyDesc_file_nav_show_recent_files = "<leader>fr Show recent files"
     71 let g:WhichKeyDesc_file_nav_show_recent_locations = "<leader>fl Show recent locations"
     72 
     73 let g:WhichKeyDesc_close_tab = "<leader>qt Close active tab"
     74 
     75 let g:WhichKeyDesc_refactoring = "<leader>r Refactoring menu"
     76 let g:WhichKeyDesc_refactoring_rename = "<leader>rn Rename element"
     77 let g:WhichKeyDesc_refactoring_method = "<leader>rm Extract method"
     78 let g:WhichKeyDesc_refactoring_variable = "<leader>rv Introduce variable"
     79 let g:WhichKeyDesc_refactoring_field = "<leader>rf Introduce field"
     80 let g:WhichKeyDesc_refactoring_signature = "<leader>rs Change signature"
     81 let g:WhichKeyDesc_refactoring_all = "<leader>rr Open refactorings list"
     82 
     83 let g:WhichKeyDesc_goto = "<leader>g Go to X"
     84 let g:WhichKeyDesc_goto_declaration = "<leader>gd Go to Definition"
     85 let g:WhichKeyDesc_goto_type_declaration = "<leader>gy Go to Type Definition"
     86 let g:WhichKeyDesc_goto_implementation = "<leader>gi Go to Implementation"
     87 let g:WhichKeyDesc_goto_usages = "<leader>gu Go to Usages"
     88 let g:WhichKeyDesc_goto_test = "<leader>gt Go to Test"
     89 let g:WhichKeyDesc_goto_back = "<leader>gb Go Back"
     90 let g:WhichKeyDesc_goto_forward = "<leader>gf Go Forward"
     91 
     92 let g:WhichKeyDesc_git = "<leader>g Git operations"
     93 let g:WhichKeyDesc_git_commit = "<leader>gc Open Git commit dialog"
     94 let g:WhichKeyDesc_git_status = "<leader>gs Open Git status dialog"
     95 let g:WhichKeyDesc_git_branches = "<leader>gb Open Git branches list"
     96 
     97 let g:WhichKeyDesc_errors = "<leader>e Error navigation"
     98 let g:WhichKeyDesc_errors_next = "<leader>en Go to next error in solution"
     99 let g:WhichKeyDesc_errors_prev = "<leader>ep Go to previous error in solution"
    100 
    101 
    102 "" Key mappings
    103 "" ========================================================
    104 
    105 inoremap jk <Esc>
    106 
    107 " Tab navigation
    108 nnoremap <C-n> :tabnext<CR>
    109 nnoremap <C-p> :tabprev<CR>
    110 
    111 " Pane navigation
    112 nnoremap <C-h> <C-w>h
    113 nnoremap <C-l> <C-w>l
    114 nnoremap <C-k> <C-w>k
    115 nnoremap <C-j> <C-w>j
    116 
    117 " Jump between methods
    118 nnoremap [[ <Action>(MethodUp)
    119 nnoremap ]] <Action>(MethodDown)
    120 
    121 " Easy visual indentation
    122 vnoremap < <gv
    123 vnoremap > >gv
    124 
    125 " Execute macro saved in 'q' register
    126 nnoremap qj @q
    127 
    128 " Popup navigation
    129 inoremap <C-j> <Action>(PopupMenu-selectNext)
    130 inoremap <C-k> <Action>(PopupMenu-selectPrev)
    131 
    132 
    133 "" Leader commands
    134 "" ========================================================
    135 
    136 " Comment lines
    137 map <leader>l <action>(CommentByLineComment)
    138 
    139 " Open NERDTree (use q to exit)
    140 map <leader>q :NERDTreeToggle<CR>
    141 
    142 " Folding
    143 map <leader>zc :action CollapseAllRegions<CR>
    144 map <leader>zo :action ExpandAllRegions<CR>
    145 
    146 " Window splits
    147 map <leader>sv <Action>(SplitVertically)
    148 map <leader>sh <Action>(SplitHorizontally)
    149 map <leader>su <Action>(Unsplit)
    150 map <leader>sm <Action>(MoveEditorToOppositeTabGroup)
    151 
    152 " Display options
    153 map <leader>dd <action>(ToggleDistractionFreeMode)
    154 map <leader>dz <action>(ToggleZenMode)
    155 map <leader>df <action>(ToggleFullScreen)
    156 
    157 " Actions
    158 map <leader>am <action>(ShowIntentionActions)
    159 map <leader>as <action>(SearchEverywhere)
    160 
    161 " File navigation
    162 map <leader>ff <action>(GotoFile)
    163 map <leader>fr <action>(RecentFiles)
    164 map <leader>fc <action>(FindInPath)
    165 map <leader><leader> <Action>(RecentFiles)
    166 map <leader>fl <action>(RecentLocations)
    167 map <leader>fs <action>(NewScratchFile)
    168 
    169 " Close active tab
    170 map <leader>qt <action>(CloseContent)
    171 
    172 " Refactoring
    173 map <leader>rn <Action>(RenameElement)
    174 map <leader>rm <Action>(ExtractMethod)
    175 map <leader>rv <Action>(IntroduceVariable)
    176 map <leader>rf <Action>(IntroduceField)
    177 map <leader>rs <Action>(ChangeSignature)
    178 map <leader>rr <Action>(Refactorings.QuickListPopupAction)
    179 
    180 " Go to code
    181 nmap <leader>gd <Action>(GotoDeclaration)
    182 nmap <leader>gy <Action>(GotoTypeDeclaration)
    183 nmap <leader>gi <Action>(GotoImplementation)
    184 nmap <leader>gu <Action>(ShowUsages)
    185 nmap <leader>gt <Action>(GotoTest)
    186 nmap <leader>gf <Action>(Back)
    187 nmap <leader>gb <Action>(Forward)
    188 
    189 " Git windows
    190 map <leader>gc <Action>(CheckinProject)
    191 map <leader>gs <Action>(ActivateVersionControlToolWindow)
    192 map <leader>gb <Action>(Git.Branches)
    193 
    194 " Errors
    195 map <leader>en <Action>(ReSharperGotoNextErrorInSolution)
    196 map <leader>ep <Action>(ReSharperGotoPrevErrorInSolution)