Skip to content

Commit

Permalink
Replace completor with supertab, small vimrc fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Vagrant User <[email protected]>
  • Loading branch information
Vagrant User authored and deathbeam committed Apr 4, 2017
1 parent d5a5754 commit 7b203c2
Show file tree
Hide file tree
Showing 9 changed files with 148 additions and 110 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
196 changes: 117 additions & 79 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion vim/.vim/bundle/completor.vim
Submodule completor.vim deleted from 6350a3
1 change: 1 addition & 0 deletions vim/.vim/bundle/supertab
Submodule supertab added at cdaa5c
2 changes: 1 addition & 1 deletion vim/.vim/bundle/tsuquyomi
2 changes: 1 addition & 1 deletion vim/.vim/bundle/vim-dirvish
2 changes: 1 addition & 1 deletion vim/.vim/bundle/vim-fugitive
Submodule vim-fugitive updated 1 files
+5 −4 plugin/fugitive.vim
46 changes: 23 additions & 23 deletions vim/.vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -321,16 +320,6 @@ cnoremap <C-N> <Down>
" (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 {{{
Expand All @@ -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
Expand All @@ -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="<c-j>"
let g:completor_auto_trigger = 0
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<C-x>\<C-u>\<C-p>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? "\<C-y>\<cr>" : "\<cr>"
" Supertab
let g:SuperTabDefaultCompletionType='context'
let g:SuperTabContextDefaultCompletionType='<c-n>'
let g:SuperTabLongestEnhanced=1
let g:SuperTabLongestHighlight=1
let g:SuperTabCrMapping=1

" Fugitive
autocmd VimRc BufReadPost fugitive://* set bufhidden=delete
Expand Down
2 changes: 1 addition & 1 deletion zsh/.fzf
Submodule .fzf updated 1 files
+11 −3 bin/fzf-tmux

0 comments on commit 7b203c2

Please sign in to comment.