From 7b203c26a32389154f3c973d95b756c5d3e27bc6 Mon Sep 17 00:00:00 2001 From: Vagrant User Date: Tue, 4 Apr 2017 20:24:25 +0200 Subject: [PATCH] Replace completor with supertab, small vimrc fixes Signed-off-by: Vagrant User --- .gitmodules | 6 +- README.md | 196 ++++++++++++++++++++-------------- vim/.vim/bundle/completor.vim | 1 - vim/.vim/bundle/supertab | 1 + vim/.vim/bundle/tsuquyomi | 2 +- vim/.vim/bundle/vim-dirvish | 2 +- vim/.vim/bundle/vim-fugitive | 2 +- vim/.vimrc | 46 ++++---- zsh/.fzf | 2 +- 9 files changed, 148 insertions(+), 110 deletions(-) delete mode 160000 vim/.vim/bundle/completor.vim create mode 160000 vim/.vim/bundle/supertab diff --git a/.gitmodules b/.gitmodules index 637194ce..f4b9acfa 100644 --- a/.gitmodules +++ b/.gitmodules @@ -101,9 +101,6 @@ [submodule "vim/.vim/bundle/editorconfig-vim"] path = vim/.vim/bundle/editorconfig-vim url = https://github.com/editorconfig/editorconfig-vim -[submodule "vim/.vim/bundle/completor.vim"] - path = vim/.vim/bundle/completor.vim - url = https://github.com/maralla/completor.vim [submodule "vim/.vim/bundle/codi.vim"] path = vim/.vim/bundle/codi.vim url = https://github.com/metakirby5/codi.vim @@ -119,3 +116,6 @@ [submodule "zsh/.zsh/bundle/alias-tips"] path = zsh/.zsh/bundle/alias-tips url = https://github.com/djui/alias-tips +[submodule "vim/.vim/bundle/supertab"] + path = vim/.vim/bundle/supertab + url = https://github.com/ervandew/supertab diff --git a/README.md b/README.md index c1a8a91b..017b3d5e 100644 --- a/README.md +++ b/README.md @@ -1,118 +1,156 @@ # dotfiles [![TravisCI Build Status](https://api.travis-ci.org/deathbeam/dotfiles.svg?branch=master)](https://travis-ci.org/deathbeam/dotfiles) -These are my configuration files for Linux and Mac. It is still work in progress, so expect a lot of changes, but I -think it is stable enough to be usable. I put this README together, because I (like most of other programmers) do not -have any life. I even added CI to this repo, because I was bored. Yes, you hear right, COUNTINUOS INTEGRATION TO -FUCKING DOTFILES REPO. I doubt anyone will ever appreciate my effort, but [frankly, my dear, I don't give a -damn](https://en.wikipedia.org/wiki/Frankly,_my_dear,_I_don't_give_a_damn). Expect a lot of changes in this repo, -because most of the time I just cannot make up my mind, and I change my decisions very often. +These are my configuration files for Linux and Mac. It is still work in +progress, so expect a lot of changes, but I think it is stable enough to be +usable. +My Vim configuration is great for Java, Haxe and Typescript development when +running Vim in Tmux and using Git. So, if you are doing all of this, then feel +free to steal some stuff from here. ## Requirements -* [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Most of the installation process is managed via - Git, so you need this one. -* [stow](https://www.gnu.org/software/stow/) - Stow is used for dotfile installation (creating symlinks) +* [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Most of + the installation process is managed via Git, so you need this one. +* [stow](https://www.gnu.org/software/stow/) - Stow is used for dotfile + installation (creating symlinks) ## How to install? It is simple, just use `make` -```shell -git clone git://github.com/deathbeam/dotfiles ~/.dotfiles -cd ~/.dotfiles -make -``` -Most of my dotfiles are using [Terminus](http://terminus-font.sourceforge.net/) font, so to make everything look -correct, install it in both TrueType and bitmap format. + git clone git://github.com/deathbeam/dotfiles ~/.dotfiles + cd ~/.dotfiles + make + +Most of my dotfiles are using [Terminus](http://terminus-font.sourceforge.net/) +font, so to make everything look correct, install it in both TrueType and bitmap +format. ## How to update? You can just use Git: -```shell -cd ~/.dotfiles -git pull --rebase -make -``` + cd ~/.dotfiles + git pull --rebase + make ## How to inlude your own stuff? -After you have installed dotfiles, you can start including your own stuff by creating appropriate `.local` dotfiles in -home directory: +After you have installed dotfiles, you can start including your own stuff by +creating appropriate `.local` dotfiles in home directory: -```shell -$EDITOR ~/.gitconfig.local -$EDITOR ~/.vimrc.local -$EDITOR ~/.zshrc.local -$EDITOR ~/.tmux.conf.local -``` + $EDITOR ~/.gitconfig.local + $EDITOR ~/.vimrc.local + $EDITOR ~/.zshrc.local + $EDITOR ~/.tmux.conf.local -To add your own Vim, Tmux or Zsh plugin you can just clone it to proper `bundle/local` directory: +To add your own Vim, Tmux or Zsh plugin you can just clone it to proper +`bundle/local` directory: -```shell -# Add SuperTab vim plugin -git clone git://github.com/ervandew/supertab ~/.vim/bundle/local/supertab + # Add SuperTab vim plugin + git clone git://github.com/ervandew/supertab \ + ~/.vim/bundle/local/supertab -# Add Tmux sessionist plugin -git clone git://github.com/tmux-plugins/tmux-sessionist ~/.tmux/bundle/local/tmux-sessionist + # Add Tmux sessionist plugin + git clone git://github.com/tmux-plugins/tmux-sessionist \ + ~/.tmux/bundle/local/tmux-sessionist -# Add zsh-autoenv zsh plugin -git clone git://github.com/Tarrasch/zsh-autoenv ~/.zsh/bundle/local/zsh-autoenv -``` + # Add zsh-autoenv zsh plugin + git clone git://github.com/Tarrasch/zsh-autoenv \ + ~/.zsh/bundle/local/zsh-autoenv ## Included stuff ### ZSH - * [alias-tips](https://github.com/djui/alias-tips): A plugin to help remembering those aliases you defined once - * [base-16-shell](https://github.com/chriskempson/base16-shell): A shell script to change your shell's default ANSI colors but most importantly, colors 17 to 21 of your shell's 256 colorspace (if supported by your terminal) - * [cdls](https://github.com/deathbeam/dotfiles/tree/master/zsh/.zsh/bundle/cdls.plugin.zsh): Runs `ls -A` on directory change - * [codi](https://github.com/deathbeam/dotfiles/tree/master/zsh/.zsh/bundle/codi.plugin.zsh): A nice way to use Codi is through a shell wrapper - * [fzf](https://github.com/junegunn/fzf): A command-line fuzzy finder written in Go - * [globalias](https://github.com/deathbeam/dotfiles/tree/master/zsh/.zsh/bundle/globalias.plugin.zsh): Expands all glob - expressions, subcommands and aliases (including global) - * [ix](https://github.com/deathbeam/dotfiles/tree/master/zsh/.zsh/bundle/ix.plugin.zsh): A command line pastebin - shell - * [vi-mode](https://github.com/deathbeam/dotfiles/tree/master/zsh/.zsh/bundle/vi-mode.plugin.zsh): Enhanced Vi mode for zsh - with history substring search support + * [alias-tips](https://github.com/djui/alias-tips): A plugin to help + remembering those aliases you defined once + * [base-16-shell](https://github.com/chriskempson/base16-shell): A shell script + to change your shell's default ANSI colors but most importantly, colors 17 to + 21 of your shell's 256 colorspace (if supported by your terminal) + * [cdls](https://github.com/deathbeam/dotfiles/tree/master/zsh/.zsh/bundle/cdls.plugin.zsh): + Runs `ls -A` on directory change + * [codi](https://github.com/deathbeam/dotfiles/tree/master/zsh/.zsh/bundle/codi.plugin.zsh): + A nice way to use Codi is through a shell wrapper + * [fzf](https://github.com/junegunn/fzf): A command-line fuzzy finder written + in Go + * [globalias](https://github.com/deathbeam/dotfiles/tree/master/zsh/.zsh/bundle/globalias.plugin.zsh): + Expands all glob expressions, subcommands and aliases (including global) + * [ix](https://github.com/deathbeam/dotfiles/tree/master/zsh/.zsh/bundle/ix.plugin.zsh): + A command line pastebin - shell + * [vi-mode](https://github.com/deathbeam/dotfiles/tree/master/zsh/.zsh/bundle/vi-mode.plugin.zsh): + Enhanced Vi mode for zsh with history substring search support * [zim](https://github.com/Eriner/zim): ZIM - Zsh IMproved ### Vim * [base16-vim](https://github.com/chriskempson/base16-vim): Base16 for Vim - * [codi.vim](https://github.com/metakirby5/codi.vim): :notebook_with_decorative_cover: The interactive scratchpad for hackers. - * [comittia.vim](https://github.com/rhysd/committia.vim): A Vim plugin for more pleasant editing on commit messages - * [completor.vim](https://github.com/maralla/completor.vim): Async completion framework made ease - * [editorconfig-vim](https://github.com/editorconfig/editorconfig-vim): EditorConfig plugin for Vim + * [codi.vim](https://github.com/metakirby5/codi.vim): + :notebook_with_decorative_cover: The interactive scratchpad for hackers. + * [comittia.vim](https://github.com/rhysd/committia.vim): A Vim plugin for more + pleasant editing on commit messages + * [editorconfig-vim](https://github.com/editorconfig/editorconfig-vim): + EditorConfig plugin for Vim * [fzf.vim](https://github.com/junegunn/fzf.vim): fzf :heart: vim - * [syntastic](https://github.com/scrooloose/syntastic): Syntax checking hacks for vim - * [tmux-complete.vim](https://github.com/wellle/tmux-complete.vim): Vim plugin for insert mode completion of words in - adjacent tmux panes + * [supertab](https://github.com/ervandew/supertab/): Perform all your vim + insert mode completions with Tab + * [syntastic](https://github.com/scrooloose/syntastic): Syntax checking hacks + for vim + * [tmux-complete.vim](https://github.com/wellle/tmux-complete.vim): Vim plugin + for insert mode completion of words in adjacent tmux panes * [tsuquyomi](https://github.com/Quramy/tsuquyomi): A Vim plugin for TypeScript - * [ultisnips](https://github.com/SirVer/ultisnips): The ultimate snippet solution for Vim - * [vaxe](https://github.com/jdonaldson/vaxe): A modern, modular vim mode for Haxe. + * [ultisnips](https://github.com/SirVer/ultisnips): The ultimate snippet + solution for Vim + * [vaxe](https://github.com/jdonaldson/vaxe): A modern, modular vim mode for + Haxe. * [vim-commentary](https://github.com/tpope/vim-commentary): comment stuff out - * [vim-dirvish](https://github.com/justinmk/vim-dirvish): Directory viewer for Vim ⚡️ - * [vim-fugitive](https://github.com/tpope/vim-fugitive): A Git wrapper so awesome, it should be illegal - * [vim-gutentags](https://github.com/ludovicchabant/vim-gutentags): A Vim plugin that manages your tag files - * [vim-javacomplete2](https://github.com/artur-shaik/vim-javacomplete2): Updated javacomplete plugin for vim - * [vim-logreview](https://github.com/andreshazard/vim-logreview): vim plugin for log navigation - * [vim-obsession](https://github.com/tpope/vim-obsession): continuously updated session files - * [vim-pathogen](https://github.com/tpope/vim-pathogen): Manage your runtimepath - * [vim-polyglot](https://github.com/sheerun/vim-polyglot): A solid language pack for Vim. - * [vim-repeat](https://github.com/tpope/vim-repeat): enable repeating supported plugin maps with "." - * [vim-rooter](https://github.com/airblade/vim-rooter): Changes Vim working directory to project root (identified by presence of known directory or file) - * [vim-snippets](https://github.com/honza/vim-snippets): contains snippets files for various programming languages - * [vim-surround](https://github.com/tpope/vim-surround): quoting/parenthesizing made simple - * [vim-test](https://github.com/janko-m/vim-test): Run your tests at the speed of thought - * [vim-unimpaired](https://github.com/tpope/vim-unimpaired): pairs of handy bracket mappings + * [vim-dirvish](https://github.com/justinmk/vim-dirvish): Directory viewer for + Vim ⚡️ + * [vim-fugitive](https://github.com/tpope/vim-fugitive): A Git wrapper so + awesome, it should be illegal + * [vim-gutentags](https://github.com/ludovicchabant/vim-gutentags): A Vim + plugin that manages your tag files + * [vim-javacomplete2](https://github.com/artur-shaik/vim-javacomplete2): + Updated javacomplete plugin for vim + * [vim-logreview](https://github.com/andreshazard/vim-logreview): vim plugin + for log navigation + * [vim-obsession](https://github.com/tpope/vim-obsession): continuously updated + session files + * [vim-pathogen](https://github.com/tpope/vim-pathogen): Manage your + runtimepath + * [vim-polyglot](https://github.com/sheerun/vim-polyglot): A solid language + pack for Vim. + * [vim-repeat](https://github.com/tpope/vim-repeat): enable repeating supported + plugin maps with "." + * [vim-rooter](https://github.com/airblade/vim-rooter): Changes Vim working + directory to project root (identified by presence of known directory or file) + * [vim-snippets](https://github.com/honza/vim-snippets): contains snippets + files for various programming languages + * [vim-surround](https://github.com/tpope/vim-surround): quoting/parenthesizing + made simple + * [vim-test](https://github.com/janko-m/vim-test): Run your tests at the speed + of thought + * [vim-tmux-navigator](https://github.com/christoomey/vim-tmux-navigator): + Seamless navigation between tmux panes and vim splits + * [vim-unimpaired](https://github.com/tpope/vim-unimpaired): pairs of handy + bracket mappings * [vim-wiki](https://github.com/vimwiki/vimwiki): Personal Wiki for Vim - * [yang.vim](https://github.com/nathanalderson/yang.vim): YANG syntax highlighting for VIM + * [yang.vim](https://github.com/nathanalderson/yang.vim): YANG syntax + highlighting for VIM ### Tmux - * [tmux-continuum](https://github.com/tmux-plugins/tmux-continuum): Continuous saving of tmux environment. Automatic restore when tmux is started. Automatic tmux start when computer is turned on. - * [tmux-copycat](https://github.com/tmux-plugins/tmux-copycat): Enhances tmux search - * [tmux-open](https://github.com/tmux-plugins/tmux-open): Tmux key bindings for quick opening of a highlighted file or url - * [tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect): Persists tmux environment across system restarts - * [tmux-sensible](https://github.com/tmux-plugins/tmux-sensible): basic tmux settings everyone can agree on - * [tmux-yank](https://github.com/tmux-plugins/tmux-yank): Plugin for copying to system clipboard - * [vim-tmux-navigator](https://github.com/christoomey/vim-tmux-navigator): Seamless navigation between tmux panes and vim splits + * [tmux-continuum](https://github.com/tmux-plugins/tmux-continuum): Continuous + saving of tmux environment. Automatic restore when tmux is started. Automatic + tmux start when computer is turned on. + * [tmux-copycat](https://github.com/tmux-plugins/tmux-copycat): Enhances tmux + search + * [tmux-open](https://github.com/tmux-plugins/tmux-open): Tmux key bindings for + quick opening of a highlighted file or url + * [tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect): Persists + tmux environment across system restarts + * [tmux-sensible](https://github.com/tmux-plugins/tmux-sensible): basic tmux + settings everyone can agree on + * [tmux-yank](https://github.com/tmux-plugins/tmux-yank): Plugin for copying to + system clipboard + * [vim-tmux-navigator](https://github.com/christoomey/vim-tmux-navigator): + Seamless navigation between tmux panes and vim splits diff --git a/vim/.vim/bundle/completor.vim b/vim/.vim/bundle/completor.vim deleted file mode 160000 index 6350a367..00000000 --- a/vim/.vim/bundle/completor.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6350a367baec6904a5f6e2005a9f5da2aaae311b diff --git a/vim/.vim/bundle/supertab b/vim/.vim/bundle/supertab new file mode 160000 index 00000000..cdaa5c27 --- /dev/null +++ b/vim/.vim/bundle/supertab @@ -0,0 +1 @@ +Subproject commit cdaa5c27c5a7f8b08a43d0b2e65929512299e33a diff --git a/vim/.vim/bundle/tsuquyomi b/vim/.vim/bundle/tsuquyomi index 07c80034..8ef3976c 160000 --- a/vim/.vim/bundle/tsuquyomi +++ b/vim/.vim/bundle/tsuquyomi @@ -1 +1 @@ -Subproject commit 07c80034c1be7a10a23fbde57bcbe77a8141e412 +Subproject commit 8ef3976c58df2446f778fd49d95b58a0fe8b4db7 diff --git a/vim/.vim/bundle/vim-dirvish b/vim/.vim/bundle/vim-dirvish index 08d49eb8..4658472c 160000 --- a/vim/.vim/bundle/vim-dirvish +++ b/vim/.vim/bundle/vim-dirvish @@ -1 +1 @@ -Subproject commit 08d49eb88c60ac92b3c4145394707425dd603d1b +Subproject commit 4658472c536c61d0beefd65e9e7fd4da988fc9b5 diff --git a/vim/.vim/bundle/vim-fugitive b/vim/.vim/bundle/vim-fugitive index 87c1bda4..eb945e9a 160000 --- a/vim/.vim/bundle/vim-fugitive +++ b/vim/.vim/bundle/vim-fugitive @@ -1 +1 @@ -Subproject commit 87c1bda4d5573185a1f79c42a919c4b62bc34c42 +Subproject commit eb945e9a114a973073a206202bd0d5df851a5193 diff --git a/vim/.vimrc b/vim/.vimrc index 7d51063c..5013ca66 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -7,15 +7,15 @@ augroup VimRc autocmd! augroup END -" Sets how many lines of history VIM has to remember -set history=200 - " Enable filetype plugins filetype plugin on filetype indent on runtime macros/matchit.vim let loaded_matchparen = 1 " disable matchparen, can be really slow +" Sets how many lines of history VIM has to remember +set history=200 + " time out for key codes set ttimeout set ttimeoutlen=100 " wait up to 100ms after Esc for special key @@ -80,11 +80,10 @@ else set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store endif +" Allows cursor change if has('nvim') " visible incremental command replace set inccommand=nosplit - - " allows cursor change let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1 else if exists('$TMUX') @@ -236,8 +235,8 @@ set smarttab set shiftwidth=2 set tabstop=2 -" Text width is 120 characters -set textwidth=120 +" Text width is 80 characters +set textwidth=80 " Better automatic indentation set autoindent @@ -321,16 +320,6 @@ cnoremap " (useful for handling the permission-denied error) command! W w !sudo tee % > /dev/null -" If session file exists, source it, and then start session recording -function! Session() - if filereadable('Session.vim') - source Session.vim - endif - - :Obsession -endfunction -command! -bar Session :call Session() - " }}} " Plugins {{{ @@ -354,6 +343,17 @@ else endtry endif +" Obsession +function! Session() + " If session file exists, source it, and then start session recording + if filereadable('Session.vim') + source Session.vim + endif + + :Obsession +endfunction +command! -bar Session :call Session() + " VimWiki let g:vimwiki_list = [{'path': '~/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}] let g:vimwiki_global_ext=0 @@ -362,12 +362,12 @@ let g:vimwiki_global_ext=0 let g:EditorConfig_core_mode = 'external_command' " Speed up editorconfig plugin let g:EditorConfig_exclude_patterns = ['fugitive://.*'] " Fix EditorConfig for fugitive -" Completor and UltiSnips -let g:UltiSnipsExpandTrigger="" -let g:completor_auto_trigger = 0 -inoremap pumvisible() ? "\" : "\\\" -inoremap pumvisible() ? "\" : "\" -inoremap pumvisible() ? "\\" : "\" +" Supertab +let g:SuperTabDefaultCompletionType='context' +let g:SuperTabContextDefaultCompletionType='' +let g:SuperTabLongestEnhanced=1 +let g:SuperTabLongestHighlight=1 +let g:SuperTabCrMapping=1 " Fugitive autocmd VimRc BufReadPost fugitive://* set bufhidden=delete diff --git a/zsh/.fzf b/zsh/.fzf index 90781974..7c8f7d3f 160000 --- a/zsh/.fzf +++ b/zsh/.fzf @@ -1 +1 @@ -Subproject commit 90781974467048a133113af1dc03830ab093f573 +Subproject commit 7c8f7d3f201b89c2e1fb1aca4b7289964469cba8