Last active
July 14, 2017 07:21
-
-
Save morten-olsen/d13579732e79ead195f5d2854015cc7c to your computer and use it in GitHub Desktop.
vim
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
| mkdir -p ~/.vim/autoload ~/.vim/bundle && \ | |
| curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim | |
| git clone https://github.com/leafgarland/typescript-vim.git ~/.vim/bundle/typescript-vim | |
| # Install and compile procvim.vim | |
| git clone https://github.com/Shougo/vimproc.vim.git ~/.vim/bundle/vimproc.vim | |
| pushd ~/.vim/bundle/vimproc.vim | |
| make | |
| popd | |
| # Install tsuquyomi | |
| git clone https://github.com/Quramy/tsuquyomi.git ~/.vim/bundle/tsuquyomi | |
| # Install and compile procvim.vim | |
| git clone https://github.com/Valloric/YouCompleteMe ~/.vim/bundle/YouCompleteMe.vim | |
| pushd ~/.vim/bundle/YouCompleteMe.vim | |
| git submodule update --init --recursive | |
| brew install cmake | |
| ./install.py --tern-completer --omnisharp-completer | |
| popd | |
| git clone https://github.com/kien/ctrlp.vim.git ~/.vim/bundle/ctrlp.vim | |
| git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree | |
| git clone https://github.com/junegunn/limelight.vim ~/.vim/bundle/limelight.vim | |
| git clone https://github.com/junegunn/goyo.vim ~/.vim/bundle/goyo.vim | |
| git clone https://github.com/altercation/vim-colors-solarized.git ~/.vim/bundle/vim-colors-solarized | |
| git clone https://github.com/bling/vim-airline ~/.vim/bundle/vim-airline | |
| git clone https://github.com/airblade/vim-gitgutter ~/.vim/bundle/vim-gitgutter | |
| git clone https://github.com/easymotion/vim-easymotion ~/.vim/bundle/vim-easymotion | |
| git clone https://github.com/tomasr/molokai ~/.vim/bundle/molokai | |
| git clone https://github.com/christoomey/vim-tmux-navigator ~/.vim/bundle/vim-tmux-navigator | |
| git clone https://github.com/janko-m/vim-test ~/.vim/bundle/vim-test | |
| git clone https://github.com/yuttie/comfortable-motion.vim ~/.vim/bundle/comfortable-motion.vim | |
| git clone https://github.com/tpope/vim-fugitive ~/.vim/bundle/vim-fugitive | |
| git clone https://github.com/junegunn/gv.vim ~/.vim/bundle/gv.vim | |
| git clone https://github.com/thaerkh/vim-workspace ~/.vim/bundle/vim-workspace | |
| git clone https://github.com/Xuyuanp/nerdtree-git-plugin.git ~/.vim/bundle/nerdtree-git-plugin |
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
| set -g mouse on | |
| # C-b is not acceptable -- Vim uses it | |
| set-option -g prefix C-a | |
| bind-key C-a last-window | |
| bind-key C-b source-file ~/.tmux.conf | |
| # Start numbering at 1 | |
| set -g base-index 1 | |
| # Set status bar | |
| set -g status-bg black | |
| set -g status-fg white | |
| set -g status-left "" | |
| set -g status-right "#[fg=green]#H" | |
| #set -g status-right '%a %b %d, %Y %H:%M' | |
| # Rather than constraining window size to the maximum size of any client | |
| # connected to the *session*, constrain window size to the maximum size of any | |
| # client connected to *that window*. Much more reasonable. | |
| setw -g aggressive-resize on | |
| # Allows us to use C-a a <command> to send commands to a TMUX session inside | |
| # another TMUX session | |
| bind-key a send-prefix | |
| # Activity monitoring | |
| #setw -g monitor-activity on | |
| #set -g visual-activity on | |
| # Example of using a shell command in the status line | |
| #set -g status-right "#[fg=yellow]#(uptime | cut -d ',' -f 2-)" | |
| # Highlight active window | |
| set-window-option -g window-status-current-bg red | |
| set -g default-terminal "screen-256color" | |
| # Smart pane switching with awareness of Vim splits. | |
| # See: https://github.com/christoomey/vim-tmux-navigator | |
| is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | |
| | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" | |
| bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" | |
| bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" | |
| bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" | |
| bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" | |
| bind-key -n C-\\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" | |
| bind-key -T copy-mode-vi C-h select-pane -L | |
| bind-key -T copy-mode-vi C-j select-pane -D | |
| bind-key -T copy-mode-vi C-k select-pane -U | |
| bind-key -T copy-mode-vi C-l select-pane -R | |
| bind-key -T copy-mode-vi C-\\ select-pane -l |
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
| execute pathogen#infect() | |
| syntax on | |
| filetype plugin indent on | |
| set background=dark | |
| colorscheme solarized | |
| if !exists('g:ycm_semantic_triggers') | |
| let g:ycm_semantic_triggers = {} | |
| endif | |
| let g:ycm_semantic_triggers['typescript'] = ['.'] | |
| if &term =~ '^screen' | |
| " tmux knows the extended mouse mode | |
| set ttymouse=xterm2 | |
| endif | |
| function! ToggleMouse() | |
| " check if mouse is enabled | |
| if &mouse == 'a' | |
| " disable mouse | |
| set mouse= | |
| else | |
| " enable mouse everywhere | |
| set mouse=a | |
| endif | |
| endfunc | |
| :set number | |
| :set tabstop=2 | |
| :set shiftwidth=2 | |
| :set expandtab | |
| let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . -co --exclude-standard', 'find %s -type f'] | |
| " 256-color terminal | |
| set t_Co=256 | |
| set term=screen-256color | |
| let g:solarized_termcolors=256 | |
| " set t_ut= | |
| let mapleader = "," | |
| colorscheme molokai | |
| let g:airline#extensions#tabline#enabled = 1 | |
| " Key bindings | |
| :nmap <Leader>m :call ToggleMouse()<CR> | |
| :nmap <Leader>n :NERDTreeToggle<CR> | |
| :nmap <Leader>df :Goyo<CR> | |
| :nmap <Leader>b :FufBuffer<CR> | |
| :nmap <C-n> :tabnew<CR> | |
| :nmap <Leader>l :tabnext<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment