Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
prontera committed Nov 17, 2017
1 parent fee089d commit 7566216
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 117 deletions.
133 changes: 17 additions & 116 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,25 @@
ln VimProjects/ideavimrc/local.vimrc ~/.ideavimrc
```

#### 自动添加
#### ideavimrc自动添加

```shell
./build.sh
./build-ideavimrc.sh
```
#### spacevim自动添加

配置基本的spacevim属性。

```sh
./build-spacevim.sh
```

#### idea properties自动添加

该策略主要是防止idea升级时覆盖自定义的配置路径,或者是多主机使用时,配置同步盘达到多机配置同步的功能。

```sh
./build-idea-proerties.sh
```

## 键位设置
Expand All @@ -27,117 +42,3 @@ ln VimProjects/ideavimrc/local.vimrc ~/.ideavimrc

如果键位不幸与默认键位冲突,优先满足默认键位,将冲突键位放置于特殊字符处,如`;`

下面是某个版本下的键位快照,并不具体代表本仓库中的`local.vimrc`实际内容

```shell
" M->cmd, A->option, C->control
" leader
let mapleader = " "

" setting
set surround
set nu
set rnu
set hlsearch
set incsearch
set showmode
set clipboard=unnamed
" Insert
inoremap jk <Esc>

" Normal
nnoremap dd ddzz
" Visual
vnoremap d dzz

" Normal + Visual
noremap # #zz
noremap * *zz
noremap w wzz
noremap W Wzz
noremap e ezz
noremap E Ezz
noremap b bzz
noremap B Bzz
noremap 0 0zz
noremap $ $zz
noremap ^ ^zz
noremap j jzz
noremap k kzz
noremap G Gzz
noremap u uzz
noremap ( (zz
noremap ) )zz
noremap { {zz
noremap } }zz
noremap [{ [{zz
noremap ]} ]}zz
noremap gd gdzz
noremap <C-O> <C-O>zz
noremap <C-I> <C-I>zz
noremap <C-D> <C-D>zz
noremap <C-U> <C-U>zz
" E和R是为了保持与Chrome中的SurfingKeys的键位一致
noremap E gT
noremap R gt

" Leader key relevant
"noremap <leader>a :action <CR>
" breakpoints
noremap <leader>b :action ViewBreakpoints<CR>
noremap <leader>c :action ChangeSignature<CR>
" 调用关系
noremap <leader>C :action CallHierarchy<CR>
" debug option
noremap <leader>d :action ChooseDebugConfiguration<CR>
" error description
noremap <leader>e :action ShowErrorDescription<CR>
" 同样也是debug,因为d已经被ChooseDebugConfiguration占领, 所以就放在了d键隔壁. 当然也可以理解成fu*k it up
noremap <leader>f :action DebugClass<CR>
"noremap <leader>g :action <CR>
" hide all
noremap <leader>h :action HideAllWindows<CR>
" import
noremap <leader>i :action Maven.Reimport<CR>
" jump to next error
noremap <leader>j :action GotoNextError<CR>
" 同样也是j, 不过是反向的, 同时也考虑到不要占用k, 所以使用了大写表示反向
noremap <leader>J :action GotoPreviousError<CR>
"noremap <leader>k :action <CR>
" light up
noremap <leader>l :action HighlightUsagesInFile<CR>
" mute breakpoints
noremap <leader>m :action XDebugger.MuteBreakpoints<CR>
" 方法继承关系
noremap <leader>M :action MethodHierarchy<CR>
" 因为属于breakpoint范畴的功能, 所以就选择了b和m的隔壁
noremap <leader>n :action ToggleLineBreakpoint<CR>
" open file path
noremap <leader>o :action ShowFilePath<CR>
" quit
noremap <leader>q :wq<CR>
" return
noremap <leader>r :action Rerun<CR>
" structure
noremap <leader>s :action FileStructurePopup<CR>
" Windows或者MacOS的快捷键都与t相关, 所以选择t作为键
noremap <leader>t :action Refactorings.QuickListPopupAction<CR>
" class继承关系
noremap <leader>T :action TypeHierarchy<CR>
" usage
noremap <leader>u :action ShowUsages<CR>
" vcs
noremap <leader>v :action Vcs.QuickListPopupAction<CR>
"noremap <leader>w :action <CR>
"noremap <leader>x :action <CR>
"noremap <leader>y :action <CR>
"noremap <leader>z :action <CR>
" 个人习惯
noremap <leader>` :action SelectInProjectView<CR>
" 粘贴剪贴板寄存器的内容
noremap <leader>; "*p
```

5 changes: 4 additions & 1 deletion build-idea-proerties.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [[ -e $HOME/.zshrc ]]; then
echo write it to zshrc
echo "export IDEA_PROPERTIES=${idea_pros_path}" >> $HOME/.zshrc
touch ${idea_pros_path}
echo 'idea.config.path=${user.home}/Public/Nutstore/config/mac/IntelliJIdea2016.3/config' >> ${idea_pros_path}
echo 'idea.config.path=${user.home}/Public/Nutstore/config/mac/IntelliJIdea2016.3/config' > ${idea_pros_path}
echo 'idea.system.path=${user.home}/Public/Nutstore/config/mac/IntelliJIdea2016.3/system' >> ${idea_pros_path}
echo 'idea.plugins.path=${user.home}/Public/Nutstore/config/mac/IntelliJIdea2016.3/plugins' >> ${idea_pros_path}
fi
Expand All @@ -23,6 +23,9 @@ if [[ -e $HOME/.bashrc ]];then
echo write it to bashrc
echo "export IDEA_PROPERTIES=${idea_pros_path}" >> $HOME/.bashrc
touch ${idea_pros_path}
echo 'idea.config.path=${user.home}/Public/Nutstore/config/mac/IntelliJIdea2016.3/config' > ${idea_pros_path}
echo 'idea.system.path=${user.home}/Public/Nutstore/config/mac/IntelliJIdea2016.3/system' >> ${idea_pros_path}
echo 'idea.plugins.path=${user.home}/Public/Nutstore/config/mac/IntelliJIdea2016.3/plugins' >> ${idea_pros_path}
fi
fi

Expand Down

0 comments on commit 7566216

Please sign in to comment.