Last active
May 17, 2017 01:47
-
-
Save RonTai/7313515 to your computer and use it in GitHub Desktop.
dotfiles
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
| "------------------------------------ | |
| " neobundle.vim | |
| "------------------------------------ | |
| set nocompatible " be iMproved | |
| filetype plugin indent off " required! | |
| if has('vim_starting') | |
| set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
| " call neobundle#rc(expand('~/.vim/bundle/')) | |
| endif | |
| "" let NeoBundleFetch manage NeoBundle | |
| " required! NeoBundleFetch 'Shougo/neobundle.vim' | |
| " recommended to install | |
| call neobundle#begin(expand('~/.vim/bundle/')) | |
| call neobundle#load_cache() | |
| NeoBundleFetch 'Shougo/vimproc', { | |
| \ 'build' : { | |
| \ 'windows' : 'make -f make_mingw32.mak', | |
| \ 'cygwin' : 'make -f make_cygwin.mak', | |
| \ 'mac' : 'make -f make_mac.mak', | |
| \ 'unix' : 'make -f make_unix.mak', | |
| \ }, | |
| \ } | |
| " after install, turn shell ~/.vim/bundle/vimproc, (n,g)make -f your_machines_makefile | |
| NeoBundle 'Shougo/vimshell' | |
| NeoBundle 'Shougo/unite.vim' | |
| NeoBundle 'ujihisa/unite-colorscheme' | |
| " My Bundles here: | |
| " vim-scripts repos | |
| NeoBundle 'tpope/vim-rails' | |
| NeoBundle 'Shougo/neocomplcache' | |
| NeoBundle 'Shougo/neosnippet' | |
| NeoBundle 'Shougo/vimfiler' | |
| NeoBundle 'mattn/emmet-vim' | |
| NeoBundle 'vim-scripts/sudo.vim' | |
| NeoBundle 'itchyny/lightline.vim' | |
| "NeoBundle 'https://github.com/powerline/powerline.git', { 'rtp' : 'powerline/bindings/vim'} | |
| "NeoBundle 'Lokaltog/powerline-fontpatcher' | |
| " colorscheme | |
| NeoBundle 'vim-scripts/wombat256.vim' | |
| NeoBundleFetch 'nanotech/jellybeans.vim' | |
| NeoBundleFetch 'w0ng/vim-hybrid' | |
| NeoBundleFetch 'vim-scripts/twilight' | |
| NeoBundleFetch 'jonathanfilip/vim-lucius' | |
| NeoBundle 'jpo/vim-railscasts-theme' | |
| NeoBundleFetch 'altercation/vim-colors-solarized' | |
| NeoBundleFetch 'vim-scripts/Wombat' | |
| NeoBundleFetch 'tomasr/molokai' | |
| NeoBundleFetch 'vim-scripts/rdark' | |
| "NeoBundleFetch 'Shougo/neosnippet' | |
| NeoBundle 'Shougo/neosnippet-snippets' | |
| " javascript | |
| NeoBundle 'pangloss/vim-javascript' | |
| " ejsテンプレート | |
| "NeoBundleFetch 'briancollins/vim-jst' | |
| " Node.jsプラグイン | |
| "NeoBundleFetch 'myhere/vim-nodejs-complete' | |
| NeoBundleFetch 'vim-scripts/javacomplete' | |
| NeoBundle 'scrooloose/nerdtree' | |
| " カラーコードの部分で色替えをしてくれるプラグイン.ただ重い | |
| "NeoBundleFetch 'skammer/vim-css-color' | |
| NeoBundleFetch 'mattn/vdbi-vim' | |
| "NeoBundleFetch 'vim-scripts/SQLUtilities' | |
| "NeoBundle 'derekwyatt/vim-scala' | |
| NeoBundle 'othree/html5.vim' | |
| NeoBundle 'scrooloose/syntastic' | |
| NeoBundleSaveCache | |
| call neobundle#end() | |
| set t_Co=256 | |
| syntax on | |
| set number | |
| set expandtab | |
| set tabstop=2 | |
| set softtabstop=2 | |
| set shiftwidth=2 | |
| set noswapfile | |
| set nobackup | |
| set showcmd | |
| set fileformats=unix,dos,mac | |
| set list | |
| set listchars=tab:»-,trail:-,eol:↲,extends:»,precedes:«,nbsp:% | |
| set guitablabel=%N:%t | |
| " Ruby用インデント設定 | |
| autocmd FileType ruby setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 | |
| " YAMLも | |
| autocmd FileType yaml setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 | |
| " ejs | |
| autocmd FileType ejs setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 | |
| " HTML | |
| autocmd FileType html setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 | |
| " Smarty | |
| autocmd FileType smarty setlocal noexpandtab shiftwidth=2 tabstop=2 softtabstop=2 | |
| " javascript | |
| autocmd FileType javascript setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2 | |
| " PHP | |
| autocmd FileType php setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4 | |
| " erb | |
| autocmd FileType erb setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 | |
| autocmd FileType html.erb setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 | |
| set hlsearch | |
| " <ESC>2回でsearch highlight消し | |
| nmap <ESC><ESC> ;nohlsearch<CR><ESC> | |
| " window移動楽にしたい | |
| nnoremap <C-j> ;<C-w>j | |
| nnoremap <C-k> ;<C-k>j | |
| nnoremap <C-l> ;<C-l>j | |
| nnoremap <C-h> ;<C-h>j | |
| " camelize | |
| map <Leader>c <Plug>(operator-camelize) | |
| map <Leader>C <Plug>(operator-decamelize) | |
| filetype plugin indent on " required! | |
| " colorscheme wombat256mod | |
| "------------------------------------ | |
| " neocomplecache.vim | |
| "------------------------------------ | |
| " Disable AutoComplPop. | |
| let g:acp_enableAtStartup = 0 | |
| " Use neocomplcache. | |
| let g:neocomplcache_enable_at_startup = 1 | |
| " Use smartcase. | |
| let g:neocomplcache_enable_smart_case = 1 | |
| " Use camel case completion. | |
| let g:neocomplcache_enable_camel_case_completion = 1 | |
| " Use underbar completion. | |
| let g:neocomplcache_enable_underbar_completion = 1 | |
| " Set minimum syntax keyword length. | |
| let g:neocomplcache_min_syntax_length = 3 | |
| let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*' | |
| " Define dictionary. | |
| let g:neocomplcache_dictionary_filetype_lists = { | |
| \ 'default' : '', | |
| \ 'vimshell' : $HOME.'/.vimshell_hist', | |
| \ 'scheme' : $HOME.'/.gosh_completions' | |
| \ } | |
| " Define keyword. | |
| if !exists('g:neocomplcache_keyword_patterns') | |
| let g:neocomplcache_keyword_patterns = {} | |
| endif | |
| let g:neocomplcache_keyword_patterns['default'] = '\h\w*' | |
| " Plugin key-mappings. | |
| imap <C-k> <Plug>(neocomplcache_snippets_expand) | |
| smap <C-k> <Plug>(neocomplcache_snippets_expand) | |
| inoremap <expr><C-g> neocomplcache#undo_completion() | |
| inoremap <expr><C-l> neocomplcache#complete_common_string() | |
| " SuperTab like snippets behavior. | |
| "imap <expr><TAB> neocomplcache#sources#snippets_complete#expandable() ? "\<Plug>(neocomplcache_snippets_expand)" : pumvisible() ? "\<C-n>" : "\<TAB>" | |
| " Recommended key-mappings. | |
| " <CR>: close popup and save indent. | |
| inoremap <expr><CR> neocomplcache#smart_close_popup() . "\<CR>" | |
| " <TAB>: completion. | |
| inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" | |
| " <C-h>, <BS>: close popup and delete backword char. | |
| inoremap <expr><C-h> neocomplcache#smart_close_popup()."\<C-h>" | |
| inoremap <expr><BS> neocomplcache#smart_close_popup()."\<C-h>" | |
| inoremap <expr><CR> pumvisible() ? neocomplcache#close_popup() : "<CR>" | |
| inoremap <expr><C-y> neocomplcache#close_popup() | |
| inoremap <expr><C-e> neocomplcache#cancel_popup() | |
| " AutoComplPop like behavior. | |
| "let g:neocomplcache_enable_auto_select = 1 | |
| " Shell like behavior(not recommended). | |
| "set completeopt+=longest | |
| "let g:neocomplcache_enable_auto_select = 1 | |
| "let g:neocomplcache_disable_auto_complete = 1 | |
| "inoremap <expr><TAB> pumvisible() ? "\<Down>" : "\<TAB>" | |
| "inoremap <expr><CR> neocomplcache#smart_close_popup() . "\<CR>" | |
| " Enable omni completion. | |
| autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS | |
| autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags | |
| autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS | |
| autocmd FileType python setlocal omnifunc=pythoncomplete#Complete | |
| autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags | |
| " Enable heavy omni completion. | |
| if !exists('g:neocomplcache_omni_patterns') | |
| let g:neocomplcache_omni_patterns = {} | |
| endif | |
| let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::' | |
| autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete | |
| let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::' | |
| let g:neocomplcache_omni_patterns.c = '\%(\.\|->\)\h\w*' | |
| let g:neocomplcache_omni_patterns.cpp = '\h\w*\%(\.\|->\)\h\w*\|\h\w*::' | |
| " ZenCoding.vim | |
| let g:user_zen_expandabbr_key = '<c-y>' | |
| let g:use_zen_complete_tag = 1 | |
| " rails.vim | |
| autocmd User Rails Rnavcommand fabricator spec/fabricators -suffix=_fabricator.rb -default=model() | |
| " vimfiler.vim | |
| let g:vimfiler_as_default_explorer = 1 | |
| let g:vimfiler_safe_mode_by_default = 0 | |
| "現在開いているバッファのディレクトリを開く | |
| nnoremap <silent> <Leader>fe :<C-u>VimFilerBufferDir -quit<CR> | |
| "現在開いているバッファをIDE風に開く | |
| nnoremap <silent> <Leader>fi :<C-u>VimFilerBufferDir -split -simple -winw | |
| " vimsnippets | |
| " Plugin key-mappings. | |
| imap <C-k> <Plug>(neosnippet_expand_or_jump) | |
| smap <C-k> <Plug>(neosnippet_expand_or_jump) | |
| " SuperTab like snippets behavior. | |
| imap <expr><TAB> neosnippet#expandable() ? "\<Plug>(neosnippet_jump)" : pumvisible() ? "\<C-n>" : "\<TAB>" | |
| smap <expr><TAB> neosnippet#expandable() ? "\<Plug>(neosnippet_jump)" : "\<TAB>" | |
| " For snippet_complete marker. | |
| if has('conceal') | |
| set conceallevel=2 concealcursor=i | |
| endif | |
| let g:neosnippet#snippets_directory='~/.vim/bundle/snipmate-snippets/snippets' | |
| "source $VIMRUNTIME/mswin.vim | |
| "behave mswin | |
| " | |
| "let g:Powerline_symbols = 'compatible' | |
| "set guifont=\ 11 | |
| if neobundle#exists_not_installed_bundles() | |
| echomsg 'Not installed bundles : ' . | |
| \ string(neobundle#get_not_installed_bundle_names()) | |
| echomsg 'Please execute ":NeoBundleInstall" command.' | |
| endif | |
| " ビジュアルモードで選択した部分を検索 | |
| vnoremap * "zy:let @/ = @z<CR>n | |
| "colorscheme torte | |
| " colorscheme molokai | |
| " UTF-8 環境でないとうまく表示されない | |
| set encoding=utf-8 | |
| " フォントサイズはお好みで | |
| set guifont=Ricty_for_Powerline:h10 | |
| " こっちは日本語フォント | |
| set guifontwide=Ricty:h10 | |
| " `fancy' テーマに切り替え | |
| let g:Powerline_symbols = 'fancy' | |
| "python from powerline.vim import setup as powerline_setup | |
| "python powerline_setup() | |
| "python del powerline_setup | |
| set laststatus=2 " Always display the statusline in all windows | |
| set showtabline=2 " Always display the tabline, even if there is only one tab | |
| set noshowmode " Hide the default mode text (e.g. -- INSERT -- below the statusline) | |
| let g:Powerline_symbols = 'fancy' | |
| "set t_Co=256 | |
| set fileformat=unix | |
| vmap <silent>sf <Plug>SQLU_Formatter<CR> | |
| nmap <silent>scl <Plug>SQLU_CreateColumnList<CR> | |
| nmap <silent>scd <Plug>SQLU_GetColumnDef<CR> | |
| nmap <silent>scdt <Plug>SQLU_GetColumnDataType<CR> | |
| nmap <silent>scp <Plug>SQLU_CreateProcedure<CR> | |
| nnoremap <silent><C-e> :NERDTree<CR> | |
| "autocmd BufRead,BufNewFile *.erb set filetype=eruby.html | |
| "let g:syntastic_mode_map = { 'mode': 'passive', 'active_filetypes': ['ruby'] } | |
| "let g:syntastic_ruby_checkers=['rubocop', 'mri'] | |
| set nocursorline | |
| set norelativenumber |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment