Skip to content

Commit

Permalink
detach config
Browse files Browse the repository at this point in the history
  • Loading branch information
ichengde committed Jan 17, 2018
1 parent ea1c131 commit 6bd79cc
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 43 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
folderSet
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ You can install [gvim](https://vim.sourceforge.io/download.php#pc) which support
[vim-operator-user](https://github.com/kana/vim-operator-user): Define your own operator easily.
[youcompleteme](https://github.com/Valloric/YouCompleteMe): a code-completion engine for Vim.
[vim-clang-format](https://github.com/rhysd/vim-clang-format): formats your code with specific coding style.
[vimproc.vim](https://github.com/Shougo/vimproc.vim.git): Interactive command execution in Vim
[vimproc.vim](https://github.com/Shougo/vimproc.vim.git): Interactive execution in Vim
[vim-clang-format](https://github.com/rhysd/vim-clang-format): Vim plugin for clang-format, a formatter for C, C++, Obj-C, Java, JavaScript, TypeScript and ProtoBuf.


## The Awesome Included Plugins

Expand Down
42 changes: 2 additions & 40 deletions awesomeVimrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,8 @@ set number
filetype indent on
set shiftwidth=2

set ofu=syntaxcomplete#Complete
highlight OverLength ctermbg=red ctermfg=white guibg=#592929

if !exists("g:ycm_semantic_triggers")
let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers['typescript'] = ['.']


nmap <Leader>- :set autochdir<cr>


""""""""""""""""""""""""""""""
" => nerdtree plugin [nerdtree](https://github.com/scrooloose/nerdtree)
""""""""""""""""""""""""""""""
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

""""""""""""""""""""""""""""""
" => Tsuquyomi plugin
""""""""""""""""""""""""""""""
nmap <Leader>2 :TsuquyomiRenameSymbol<cr>
nmap <Leader>3 :TsuquyomiRenameSymbolC<cr>

""""""""""""""""""""""""""""""
" => ClangFormat plugin
""""""""""""""""""""""""""""""
map <Leader>` :ClangFormat<cr>
let g:clang_format#style_options = {
\ 'ColumnLimit' : '0',
\ 'Language' : 'JavaScript',
\ 'BasedOnStyle' : 'Mozilla',
\ }
" \ 'JavaScriptQuotes' : 'Single',
" \ 'BreakBeforeBraces' : 'Custom',
" \ 'BraceWrapping' : {
" \ 'AfterClass': 'false',
" \ 'AfterFunction' : 'false',
" \ 'BeforeCatch' : 'false',
" \ 'IndentBraces' : 'false',
" \ }
source './folderSet'
source './pluginSet'

43 changes: 43 additions & 0 deletions pluginSet
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
""""""""""""""""""""""""""""""
" => YouCompleteMe plugin [youcompleteme](https://github.com/Valloric/YouCompleteMe)
""""""""""""""""""""""""""""""

set ofu=syntaxcomplete#Complete
highlight OverLength ctermbg=red ctermfg=white guibg=#592929

if !exists("g:ycm_semantic_triggers")
let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers['typescript'] = ['.']

""""""""""""""""""""""""""""""
" => nerdtree plugin [nerdtree](https://github.com/scrooloose/nerdtree)
""""""""""""""""""""""""""""""
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

""""""""""""""""""""""""""""""
" => Tsuquyomi plugin [tsuquyomi](https://github.com/Quramy/tsuquyomi.git)
""""""""""""""""""""""""""""""
nmap <Leader>2 :TsuquyomiRenameSymbol<cr>
nmap <Leader>3 :TsuquyomiRenameSymbolC<cr>

""""""""""""""""""""""""""""""
" => ClangFormat plugin [vim-clang-format](https://github.com/rhysd/vim-clang-format)
""""""""""""""""""""""""""""""
map <Leader>` :ClangFormat<cr>
let g:clang_format#style_options = {
\ 'ColumnLimit' : '0',
\ 'Language' : 'JavaScript',
\ 'BasedOnStyle' : 'Mozilla',
\ }
" \ 'JavaScriptQuotes' : 'Single',
" \ 'BreakBeforeBraces' : 'Custom',
" \ 'BraceWrapping' : {
" \ 'AfterClass': 'false',
" \ 'AfterFunction' : 'false',
" \ 'BeforeCatch' : 'false',
" \ 'IndentBraces' : 'false',
" \ }

6 changes: 4 additions & 2 deletions setVimrc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ fi


vimrc=${vimRuntime}my_configs.vim

folderSet=${vimRuntime}folderSet.vim
pluginSet=${vimRuntime}pluginSet.vim

cp awesomeVimrc ${vimrc}

cp folderSet ${folderSet}
cp pluginSet ${pluginSet}

0 comments on commit 6bd79cc

Please sign in to comment.