-
-
Save matthewjberger/531c48c5cbf7bafc24ef5a9f6745115f to your computer and use it in GitHub Desktop.
my terminal settings for windows (babun - http://babun.github.io/) curl https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/babun-post-install | zsh
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
Font=Powerline Consolas | |
ForegroundColour=131,148,150 | |
BackgroundColour=0,43,54 | |
CursorColour=220,50,47 | |
Black=7,54,66 | |
BoldBlack=0,43,54 | |
Red=220,50,47 | |
BoldRed=203,75,22 | |
Green=133,153,0 | |
BoldGreen=88,110,117 | |
Yellow=181,137,0 | |
BoldYellow=101,123,131 | |
Blue=38,139,210 | |
BoldBlue=131,148,150 | |
Magenta=211,54,130 | |
BoldMagenta=108,113,196 | |
Cyan=42,161,152 | |
BoldCyan=147,161,161 | |
White=238,232,213 | |
BoldWhite=253,246,227 | |
Transparency=low | |
FontHeight=12 | |
Scrollbar=none |
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
# curl https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/.tmux.conf -o ~/.tmux.conf | |
bind r source-file ~/.tmux.conf \; display "Reloaded!" | |
# Change the prefix to Ctrl+a | |
unbind C-b | |
set -g prefix C-a | |
bind C-a send-prefix | |
# enable pretty colors | |
set -g default-terminal "screen-256color" | |
# increase scroll-back history | |
set -g history-limit 5000 | |
# use vim key bindings | |
setw -g mode-keys vi | |
# start window index at 1 | |
set -g base-index 1 | |
# start pane index at 1 | |
set -g pane-base-index 1 | |
# change the default delay to make it more responsive | |
set -sg escape-time 1 | |
# Splitting panes | |
bind \ split-window -h | |
bind - split-window -v | |
# pane movements | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
# pane resizing | |
bind H resize-pane -L 5 | |
bind J resize-pane -D 5 | |
bind K resize-pane -U 5 | |
bind L resize-pane -R 5 | |
# pane resizing | |
bind -r H resize-pane -L 5 | |
bind -r J resize-pane -D 5 | |
bind -r K resize-pane -U 5 | |
bind -r L resize-pane -R 5 | |
# window movement | |
bind -r C-h select-window -t:- | |
bind -r C-l select-window -t:+ | |
# remapping copy paste to vim | |
# unbind [ | |
bind Escape copy-mode | |
unbind p | |
bind p paste-buffer | |
bind -t vi-copy 'v' begin-selection | |
bind -t vi-copy 'y' copy-selection | |
# setw -g monitory-activity on | |
set -g visual-activity on | |
# Enable mouse support in ~/.tmux.conf | |
set-option -g mouse-select-pane on | |
set-option -g mouse-select-window on | |
set-window-option -g mode-mouse on | |
# mouse can be used to resize panes (by dragging dividers) | |
set -g mouse-resize-pane on | |
# smart pane switching with awareness of vim splits | |
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L" | |
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D" | |
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U" | |
#bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R" | |
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l" | |
set-option -g renumber-windows on | |
setw -g aggressive-resize on | |
# status bar | |
set -g status-interval 2 | |
set -g status-left-length 52 | |
set -g status-right-length 451 | |
set -g status-fg white | |
set -g status-bg colour234 | |
set -g window-status-activity-attr bold | |
set -g pane-border-fg colour245 | |
set -g pane-active-border-fg colour39 | |
set -g message-fg colour16 | |
set -g message-bg colour221 | |
set -g message-attr bold | |
set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]#[fg=colour245,bg=colour238,bold] #(whoami)#[fg=colour238,bg=colour234,nobold]' | |
set -g window-status-format "#[fg=white,bg=colour234] #I #W " | |
set -g window-status-current-format "#[fg=colour234,bg=colour39]#[fg=colour25,bg=colour39,noreverse,bold] #I #W #[fg=colour39,bg=colour234,nobold]" | |
set -g status-right "#[fg=colour235,bg=colour252,bold] %d %b#[fg=colour238,bg=colour252,nobold]#[fg=colour245,bg=colour238,bold]%r" |
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
" For windows: | |
" install chocolatey | |
" choco install curl | |
" install fonts from ~/.config/nvim/cache/fonts (note: nerd-fonts is over 1gb when cloning) | |
" install python2 and python 3 and add to path | |
" download lua from: http://sourceforge.net/projects/luabinaries/files/5.3/Windows%20Libraries/Dynamic/lua-5.3_Win64_dllw4_lib.zip/download | |
" | |
" NeoVim instructions | |
" https://github.com/neovim/neovim/wiki/Installing-Neovim | |
" For windows: | |
" https://github.com/neovim/neovim/issues/5229 | |
" https://github.com/equalsraf/neovim-qt/releases | |
set nocompatible | |
let mapleader = ' ' | |
nnoremap ; : | |
let s:is_win = has('win32') || has('win64') | |
let s:is_cygwin = has('win32unix') | |
let s:is_mac = has('macunix') || (executable('uname') && system('uname') =~? '^darwin') | |
let settings = {} | |
let settings.rtp = expand('~/.config/nvim') | |
let settings.cache = settings.rtp . '/cache' | |
let settings.plugins = settings.cache . '/plugins' | |
let settings.completionlib = '' | |
let settings.snippets=0 | |
let settings.uniteinterface = '' | |
" bootstrap/vim-plug {{{ | |
function! Mkdirp(dirname) | |
if !isdirectory(expand(a:dirname)) | |
call mkdir(expand(a:dirname), 'p') | |
endif | |
endfunction | |
if has('vim_starting') && !has('nvim') | |
execute printf('set rtp+=%s', g:settings.rtp) | |
endif | |
if !filereadable(g:settings.rtp . '/autoload/plug.vim') | |
execute 'silent !curl -fkLo ' . expand(g:settings.rtp . '/autoload/plug.vim') ' --create-dirs' | |
\ ' https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' | |
autocmd VimEnter * PlugInstall | |
end | |
" }}} | |
if s:is_win | |
set shellslash | |
endif | |
" plugins {{{ | |
call plug#begin(g:settings.plugins) | |
" plugins-colorscheme {{{ | |
Plug 'mhartington/oceanic-next' | |
Plug 'iCyMind/NeoSolarized' | |
Plug 'altercation/vim-colors-solarized' | |
" }}} | |
" plugins-ui {{{ | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'Yggdroot/indentLine' | |
Plug 'ntpeters/vim-better-whitespace' | |
Plug 'yonchu/accelerated-smooth-scroll' | |
" Plug 'scrooloose/syntastic' | |
" }}} | |
" plugins-ctrlp {{{ | |
Plug 'ctrlpvim/ctrlp.vim' | |
if has('python') || has('python3') | |
Plug 'FelikZ/ctrlp-py-matcher' | |
endif | |
Plug 'dbeecham/ctrlp-commandpalette.vim' | |
Plug 'hara/ctrlp-href' | |
Plug 'mattn/ctrlp-google' | |
Plug 'mattn/ctrlp-launcher' | |
Plug 'mattn/ctrlp-vimpatches' | |
Plug 'mattn/ctrlp-windowselector' | |
Plug 'okcompute/vim-ctrlp-session' | |
Plug 'ompugao/ctrlp-history' | |
Plug 'pasela/ctrlp-cdnjs' | |
Plug 'prabirshrestha/ctrlp-env' | |
Plug 'tacahiroy/ctrlp-funky' | |
Plug 'voronkovich/ctrlp-nerdtree.vim' | |
" }}} | |
" plugins-filetypes {{{ | |
Plug 'chrisbra/csv.vim', { 'for': 'csv' } | |
Plug 'elzr/vim-json', { 'for': 'json' } | |
Plug 'tpope/vim-jdaddy', { 'for': 'json' } | |
Plug 'mattn/emmet-vim' | |
" Plug 'leafgarland/typescript-vim' | |
Plug 'HerringtonDarkholme/yats.vim', { 'for': 'typescript' } | |
if !has('nvim') | |
Plug 'Quramy/tsuquyomi', { 'for': 'typescript' } | |
endif | |
Plug 'OrangeT/vim-csharp' | |
Plug 'amirh/HTML-AutoCloseTag' | |
if (s:is_win && has('python')) | |
Plug 'OmniSharp/omnisharp-vim', { 'do': 'cd server && C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\msbuild.exe' } | |
endif | |
" }}} | |
" plugins-unite.vim {{{ | |
Plug 'Shougo/unite.vim' | |
Plug 'Shougo/unite-outline' | |
Plug 'beans15/unite-maven' | |
Plug 'choplin/unite-spotlight' | |
Plug 'f110/vim-unite-jenkins' | |
" Plug 'farseer90718/unite-workflow' | |
Plug 'jbking/unite-spell-suggest' | |
Plug 'joker1007/unite-pull-request' | |
Plug 'junkblocker/unite-codesearch' | |
" Plug 'kamichidu/vim-unite-javaimport' | |
Plug 'mackee/unite-httpstatus' | |
Plug 'mattn/unite-gist' | |
Plug 'mmisono/unite-compiler' | |
Plug 'mopp/unite-rss' | |
Plug 'osyo-manga/unite-airline_themes' | |
Plug 'osyo-manga/unite-env' | |
Plug 'osyo-manga/unite-fold' | |
Plug 'osyo-manga/unite-quickfix' | |
Plug 'osyo-manga/unite-vimpatches' | |
Plug 'pasela/unite-webcolorname' | |
Plug 'prabirshrestha/unite-hackernews' | |
Plug 'prabirshrestha/unite-nuget' | |
Plug 'rhysd/unite-mac-apps' | |
Plug 'rhysd/unite-ruby-require.vim' | |
Plug 'rhysd/unite-stackoverflow.vim' | |
Plug 'ryotakato/unite-outline-objc' | |
Plug 'shiena/unite-path' | |
Plug 'skeept/Ultisnips-neocomplete-unite' | |
Plug 'tacroe/unite-alias' | |
Plug 'tacroe/unite-mark' | |
Plug 'thinca/vim-unite-history' | |
Plug 'tsukkee/unite-help' | |
Plug 'tsukkee/unite-tag' | |
Plug 'ujihisa/unite-font' | |
" Plug 'ujihisa/unite-launch' | |
Plug 'ujihisa/unite-rake' | |
Plug 'zhaocai/unite-scriptnames' | |
Plug 'zoncoen/unite-autojump' | |
" }}} | |
Plug 'ervandew/supertab' | |
" Plug denite.nvim/ctrlp.vim {{{ | |
if (has('nvim') || (v:version >= 800)) && has('python3') | |
let g:settings.uniteinterface='denite' | |
Plug 'Shougo/denite.nvim', { 'do': ':UpdateRemotePlugins' } | |
else | |
let g:settings.uniteinterface='ctrlp' | |
Plug 'endel/ctrlp-filetype.vim' | |
Plug 'hara/ctrlp-colorscheme' | |
endif | |
" }}} | |
" plugins-misc {{{ | |
Plug 'DataWraith/auto_mkdir' | |
Plug 'Lokaltog/vim-easymotion' | |
Plug 'Shougo/vimshell.vim' | |
Plug 'airblade/vim-rooter' | |
Plug 'jreybert/vimagit' | |
Plug 'mattn/webapi-vim' | |
Plug 'scrooloose/nerdtree' | |
Plug 'Xuyuanp/nerdtree-git-plugin' | |
Plug 'gregsexton/gitv' | |
Plug 'tomtom/tcomment_vim' | |
Plug 'tpope/vim-dispatch' | |
Plug 'tpope/vim-fugitive' | |
Plug 'tpope/vim-repeat' | |
Plug 'tpope/vim-surround' | |
Plug 'tyru/open-browser.vim' | |
Plug 'wellle/targets.vim' | |
Plug 'xolox/vim-misc' | |
Plug 'xolox/vim-shell' | |
Plug 'jiangmiao/auto-pairs' | |
Plug 'vim-scripts/loremipsum' | |
Plug 'rking/ag.vim' | |
Plug 'prabirshrestha/async.vim' | |
Plug 'mhinz/vim-grepper' | |
if !s:is_win && !has('nvim') | |
Plug 'editorconfig/editorconfig-vim' | |
endif | |
Plug 'rust-lang/rust.vim' | |
Plug 'racer-rust/vim-racer', { 'for': ['rust'] } | |
if s:is_win | |
Plug 'Shougo/vimproc.vim', { 'do': 'curl -fkLo ' . expand(g:settings.plugins . '/vimproc.vim/lib/vimproc_win64.dll') | |
\ . ' --create-dirs https://github.com/Shougo/vimproc.vim/releases/download/ver.9.2/vimproc_win64.dll' } | |
else | |
Plug 'Shougo/vimproc.vim', { 'do': 'make' } | |
endif | |
" }}} | |
if has('nvim') | |
Plug 'equalsraf/neovim-gui-shim' | |
endif | |
if has('python') || has('python3') | |
Plug 'SirVer/ultisnips' | |
Plug 'honza/vim-snippets' | |
let g:settings.snippets = 1 | |
endif | |
if has('nvim') && has('python3') | |
let g:settings.completionlib = 'deoplete' | |
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
Plug 'benekastah/neomake' | |
Plug 'mhartington/deoplete-typescript', { 'for': ['typescript'] } | |
" Plug 'zchee/deoplete-go', { 'for': ['go'] } "go get -u github.com/nsf/gocode | |
" Plug 'zchee/deoplete-jedi', { 'for': ['python'] } | |
" Plug 'zchee/deoplete-clang' | |
" Plug 'carlitux/deoplete-ternjs', { 'for': ['javascript'] } | |
" Plug 'SevereOverfl0w/deoplete-github' | |
" Plug 'steelsojka/deoplete-flow' | |
elseif has('python') || has('python3') | |
let g:settings.completionlib = 'neocomplete' | |
Plug 'Shougo/neocomplete.vim' | |
endif | |
Plug 'Shougo/neoinclude.vim' | |
Plug 'Shougo/neco-syntax' | |
call plug#end() | |
" }}} | |
" vimrc {{{ | |
nnoremap <leader>ev :e $MYVIMRC<cr> | |
nnoremap <leader>sv :source $MYVIMRC<cr> | |
" }}} | |
" colorscheme {{{ | |
if (has("termguicolors")) | |
set termguicolors | |
endif | |
if has('nvim') | |
let $NVIM_TUI_ENABLE_TRUE_COLOR=1 | |
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1 | |
endif | |
if $TERM == "xterm-256color" || $TERM == "screen-256color" || $COLORTERM == "gnome-terminal" | |
set t_Co=256 | |
endif | |
try | |
colorscheme NeoSolarized | |
catch | |
endtry | |
set background=dark | |
if !has('nvim') | |
set noantialias " Turn on/off Anti-Aliased Fonts | |
endif | |
" set guifont=* to select fonts | |
" set guifont? to get the name of the current font | |
" set guifont=Consolas\ for\ Powerline\ FixedD:h11 | |
set guifont=UbuntuMono_NF:h12:cANSI:qDRAFT | |
set guifont=Ubuntu\ Mono\ Nerd\ Font\ Complete\ Mono\ Windows\ Compatible:h12 | |
" Add this in ginit.vim for NeoVim | |
" " Guifont! Ubuntu Mono:h12 | |
" Guifont! Ubuntu Mono:h12 | |
syntax enable | |
" }}} | |
" general {{{ | |
inoremap jj <ESC> | |
inoremap jk <ESC> | |
set mouse=a " Automatically enable mouse usage | |
set mousehide " Hide the mouse cursor while typing | |
" Paste. | |
nnoremap <RightMouse> "+p | |
xnoremap <RightMouse> "+p | |
inoremap <RightMouse> <C-r><C-o>+ | |
cnoremap <RightMouse> <C-r>+ | |
if has('clipboard') | |
if has('unnamedplus') " When possible use + register for copy-paste | |
set clipboard=unnamed,unnamedplus | |
else " On mac and Windows, use * register for copy-paste | |
set clipboard=unnamed | |
endif | |
endif | |
" copy cut and paste settings for clipboard | |
vmap <C-c> "+y | |
vmap <C-x> "+c | |
vmap <C-v> c<ESC>"+p | |
imap <C-v> <C-r><C-o>+ | |
set shortmess+=fIlmnrxoOtT " Abbrev. of messages (avoids 'hit enter') | |
set viewoptions=folds,options,cursor,unix,slash " Better Unix / Windows compatibility | |
" disable entering ex mode | |
map Q <Nop> | |
" Clear current search highlighting by fast // | |
nmap <silent> // :nohlsearch<CR> | |
" use Ctrl-S for saving, also in insert mode | |
" make sure to set these two lines in ~/.bash_profile and ~/.zshrc | |
" bind -r '\C-s' | |
" stty -ixon | |
nmap <c-s> :w<CR> | |
imap <c-s> <Esc>:w<CR>a | |
imap <c-s> <Esc><c-s> | |
" Quit | |
inoremap <C-Q> <esc>:q<cr> | |
nnoremap <C-Q> :q<cr> | |
vnoremap <C-Q> <esc> | |
nnoremap <Leader>q :q<cr> | |
nnoremap <Leader>Q :qa!<cr> | |
" Make Y behave like other capitals | |
nnoremap Y y$ | |
" Stupid shift key fixes | |
if has("user_commands") | |
command! -bang -nargs=* -complete=file E e<bang> <args> | |
command! -bang -nargs=* -complete=file W w<bang> <args> | |
command! -bang -nargs=* -complete=file Wq wq<bang> <args> | |
command! -bang -nargs=* -complete=file WQ wq<bang> <args> | |
command! -bang Wa wa<bang> | |
command! -bang WA wa<bang> | |
command! -bang Q q<bang> | |
command! -bang QA qa<bang> | |
command! -bang Qa qa<bang> | |
endif | |
" reselect what was just pasted | |
nnoremap <leader>v V`] | |
" Shortcuts | |
" Change working Directory to that of the current file | |
cmap cwd lcd %:p:h | |
cmap cd. lcd %:p:h | |
" Visual shifting (does not exit Visual mode) | |
vnoremap < <gv | |
vnoremap > >gv | |
" For when you forget to sudo.. Really Write the file. | |
cmap w!! w !sudo tee % >/dev/null | |
" No annoying sound on errors | |
" set noerrorbells visualbell t_vb= | |
autocmd GUIEnter * set visualbell t_vb= | |
if has("multi_byte") | |
if &termencoding == "" | |
let &termencoding = &encoding | |
endif | |
if !has('nvim') | |
set encoding=utf-8 | |
scriptencoding utf-8 | |
endif | |
setglobal fileencoding=utf-8 | |
"setglobal bomb | |
set fileencodings=ucs-bom,utf-8,latin1 | |
endif | |
" set autowrite " Automatically write a file when leaving a modified buffer | |
set viewoptions=folds,options,cursor,unix,slash " Better unix / windows compatibility | |
set virtualedit=onemore " Allow for cursor beyond last character | |
set history=1000 " Allow for cursor beyond last character | |
if !has ('gui_running') && !s:is_win | |
set spell " Spell checking on | |
set spelllang=en_us " Set en-us as default language | |
set spellsuggest=best,5 | |
endif | |
set hidden " Allow buffer switching without saving | |
" Setting up the directories | |
set nobackup | |
set noswapfile | |
if has('persistent_undo') | |
call Mkdirp(g:settings.cache . '/undo') | |
execute 'set undodir='. g:settings.cache . '/undo' | |
set undofile " So is persistent undo ... | |
set undolevels=1000 " Maximum number of changes that can be undone | |
set undoreload=1000 " Maximum number lines to save for undo on a buffer reload | |
endif | |
set tabpagemax=15 " Only show 15 tabs | |
set showmode " Display current mode | |
set cursorline " Highlight current line | |
highlight clear SignColumn " SignColumn should match background | |
highlight clear LineNr " Current line number row will have same background color in relative mode | |
set backspace=indent,eol,start " Backspace for dummies | |
set linespace=0 " No extra spaces between rows | |
set nu " Line numbers on | |
set showmatch " Show matching brackets/parenthesis | |
set incsearch " Find as you type search | |
set hlsearch " Highlight search terms | |
set winminheight=0 " Windows can be 0 line height | |
set ignorecase " Case insensitive search | |
set smartcase " Case sensitive when uc present | |
set wildmenu " Show list instead of just completing | |
set wildmode=list:longest,full " Command <Tab> completion, list matches, then longest common part, then all. | |
set whichwrap=b,s,h,l,<,>,[,] " Backspace and cursor keys wrap too | |
set scrolljump=5 " Lines to scroll when cursor leaves screen | |
set scrolloff=3 " Minimum lines to keep above and below cursor | |
set foldenable " Auto fold code | |
set list | |
" Highlight problematic whitespace | |
set listchars=tab:›\ ,trail:•,extends:#,nbsp:. | |
set showbreak=··· | |
set nowrap " Do not wrap long lines | |
set autoindent " Indent at the same level of the previous line | |
set shiftwidth=4 " Use indents of 4 spaces | |
set expandtab " Tabs are spaces, not tabs | |
set tabstop=4 " An indentation every four columns | |
set softtabstop=4 " Let backspace delete indent | |
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J) | |
set splitright " Puts new vertical split windows to the right of the current | |
set splitbelow " Puts new split windows to the bottom of the current | |
set pastetoggle=<F12> " paste toggle (sane indentation pastes) | |
" Disable menu.vim | |
if has('gui_running') | |
set guioptions=Mc | |
endif | |
" easier split navigations: http://robots.thoughtbot.com/vim-splits-move-faster-and-more-naturally | |
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-W><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
nnoremap <silent> <leader>p :call ToggleOption('paste')<CR> | |
nnoremap <silent> <leader>w :call ToggleOption('wrap')<CR> | |
nnoremap <silent> <leader>sp :call ToggleOption('spelling')<CR> | |
nnoremap <silent> <leader>ln :call ToggleOption('relativenumber')<CR> | |
nnoremap <silent> <leader>t2 :setl shiftwidth=2 softtabstop=2<CR> | |
nnoremap <silent> <leader>t4 :setl shiftwidth=4 softtabstop=4<CR> | |
nnoremap <silent> <leader>t8 :setl shiftwidth=8 softtabstop=8<CR> | |
" }}} | |
" vim-airline {{{ | |
set laststatus=2 " Make the second to last line of vim our status line | |
let g:Powerline_symbols="fancy" | |
let g:airline_theme="solarized" | |
let g:airline_powerline_fonts = 1 | |
if !exists('g:airline_symbols') | |
let g:airline_symbols = {} | |
endif | |
let g:airline#extensions#tabline#enabled = 0 | |
let g:airline#extensions#tabline#show_buffers = 0 | |
"if using consolas uncomment the following lines | |
" let g:airline_left_sep = "\u2b80" "use double quotes here | |
" let g:airline_left_alt_sep = "\u2fb81" | |
" let g:airline_right_sep = "\u2b82" | |
" let g:airline_right_alt_sep = "\u2b83" | |
" }}} | |
" ctrlp.vim {{{ | |
let g:ctrlp_cache_dir = g:settings.cache . '/ctrlp' | |
let g:ctrlp_max_files = 0 | |
let g:ctrlp_working_path_mode = 'ra' | |
let g:ctrlp_lazy_update = 1 | |
let g:ctrlp_max_files = 0 " set no max file limit | |
let g:ctrlp_clear_cache_on_exit = 0 " don't clear cache when exit | |
let g:ctrlp_switch_buffer = 0 | |
let g:ctrlp_funky_syntax_highlight = 1 | |
let g:ctrlp_nerdtree_show_hidden = 1 | |
let g:ctrlp_extensions = ['filetype', 'session'] | |
let g:ctrlp_root_markers = ['[root]'] | |
let g:ctrlp_custom_ignore = { | |
\ 'dir': '\.git$\|\.hg$\|node_modules$\|\.svn$\|out$\|objd$', | |
\ 'file': '\.exe$\|\.exe.config$\|\.so$\|\.dll$\|\.pdb$\|\.pyc$' } | |
call Mkdirp(g:settings.cache . '/vim-ctrlp-session') | |
let g:ctrlp_session_path = g:settings.cache . '/vim-ctrlp-session' | |
" map <Leader>fd :CtrlPCurFile<CR> | |
" map <Leader>fb :CtrlPBuffer<CR> | |
nnoremap <Leader>ss :CtrlPSession<CR> | |
nnoremap <Leader>r :CtrlPMRUFiles<Cr> | |
nnoremap <Leader>m :CtrlPMRU<Cr> | |
nnoremap <Leader>o :CtrlPFunky<Cr> | |
" nnoremap <Leader>O :execute 'CtrlPFunky '.expand('<cword>')<Cr> | |
" nnoremap <Leader>hn :CtrlPHackerNews<Cr> | |
" }}} | |
" unite.vim {{{ | |
let g:unite_data_directory=g:settings.cache . '/unite' | |
let g:unite_enable_start_insert = 1 | |
let g:unite_split_rule = "botright" | |
let g:unite_force_overwrite_statusline = 0 | |
let g:unite_winheight = 10 | |
let g:unite_source_history_yank_enable = 1 | |
let g:unite_update_time = 300 | |
let g:unite_source_file_mru_limit = 100 | |
let g:unite_source_session_enable_auto_save = 1 | |
let g:unite_source_rec_max_cache_files = -1 | |
let g:unite_prompt='» ' | |
let g:unite_marked_icon = '✓' | |
call unite#custom_source('file_rec,file_rec/async,file_mru,file,buffer,grep', | |
\ 'ignore_pattern', join([ | |
\ '\.git/', | |
\ 'tmp/', | |
\ 'node_modules/', | |
\ 'vendor/', | |
\ 'Vendor/', | |
\ 'bower_components/', | |
\ ], '\|')) | |
call unite#filters#matcher_default#use(['matcher_fuzzy']) | |
call unite#filters#sorter_default#use(['sorter_rank']) | |
if has('python') || has('python3') | |
let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' } | |
endif | |
nnoremap <silent> <leader>u :Unite<CR> | |
nnoremap <silent> <leader>c :Unite command<CR> | |
nnoremap <silent> <leader>fo :Unite fold<CR> | |
nnoremap <silent> <leader>qf :Unite quickfix<CR> | |
autocmd FileType unite call s:unite_settings() | |
function! s:unite_settings() | |
" let b:SuperTabDisabled=1 | |
" exit with esc | |
nmap <buffer> <ESC> <Plug>(unite_exit) | |
imap <buffer> <ESC> <Plug>(unite_exit) | |
" exit with ctrl-c | |
imap <buffer> <c-c> <Plug>(unite_exit) | |
nmap <buffer> <c-c> <Plug>(unite_exit) | |
" Ctrl jk mappings | |
imap <buffer> <c-j> <Plug>(unite_insert_leave) | |
imap <buffer> <c-k> <Plug>(unite_insert_leave) | |
nmap <buffer> <c-j> <Plug>(unite_loop_cursor_down) | |
nmap <buffer> <c-k> <Plug>(unite_loop_cursor_up) | |
" jj becuase you're lazy, and leave insert mode | |
imap <buffer> jj <Plug>(unite_insert_leave) | |
" qq `` becuase you're lazy, and quit unite | |
imap <buffer> qq <Plug>(unite_exit) | |
imap <buffer> `` <Plug>(unite_exit) | |
" refresh unite | |
nmap <buffer> <C-r> <Plug>(unite_redraw) | |
imap <buffer> <C-r> <Plug>(unite_redraw) | |
" choose action | |
nmap <buffer> <C-a> <Plug>(unite_choose_action) | |
imap <buffer> <C-a> <Plug>(unite_choose_action) | |
" split control | |
inoremap <silent><buffer><expr> <C-s> unite#do_action('split') | |
nnoremap <silent><buffer><expr> <C-s> unite#do_action('split') | |
inoremap <silent><buffer><expr> <C-v> unite#do_action('vsplit') | |
nnoremap <silent><buffer><expr> <C-v> unite#do_action('vsplit') | |
imap <buffer> <Tab> <Plug>(unite_complete) | |
imap <buffer> <C-w> <Plug>(unite_delete_backward_path) | |
endfunction | |
" }}} | |
" NERDTree {{{ | |
nnoremap <silent> <leader>e :NERDTreeFind<CR> | |
nnoremap <silent> <leader>E :NERDTreeToggle<CR> | |
" nnoremap <C-\> :NERDTreeToggle<CR> | |
" nnoremap \| :NERDTreeFind<CR> | |
" function! NTFinderP() | |
" if g:NERDTree.IsOpen() | |
" :NERDTreeClose | |
" else | |
" :NERDTreeFind | |
" endif | |
" endfunction | |
" | |
" map <silent> <leader>e :call NTFinderP()<CR> | |
let NERDTreeShowHidden=1 | |
let g:NERDTreeWinSize=45 | |
let g:NERDTreeAutoDeleteBuffer=1 | |
function! NERDTreeHighlightFile(extension, fg, bg, guifg, guibg) | |
exec 'autocmd FileType nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg | |
exec 'autocmd FileType nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#' | |
endfunction | |
call NERDTreeHighlightFile('jade', 'green', 'NONE', 'green', 'NONE') | |
call NERDTreeHighlightFile('md', 'blue', 'NONE', '#6699CC', 'NONE') | |
call NERDTreeHighlightFile('config', 'yellow', 'NONE', '#d8a235', 'NONE') | |
call NERDTreeHighlightFile('conf', 'yellow', 'NONE', '#d8a235', 'NONE') | |
call NERDTreeHighlightFile('json', 'green', 'NONE', '#d8a235', 'NONE') | |
call NERDTreeHighlightFile('html', 'yellow', 'NONE', '#d8a235', 'NONE') | |
call NERDTreeHighlightFile('css', 'cyan', 'NONE', '#5486C0', 'NONE') | |
call NERDTreeHighlightFile('scss', 'cyan', 'NONE', '#5486C0', 'NONE') | |
call NERDTreeHighlightFile('coffee', 'Red', 'NONE', 'red', 'NONE') | |
call NERDTreeHighlightFile('js', 'Red', 'NONE', '#ffa500', 'NONE') | |
call NERDTreeHighlightFile('ts', 'Blue', 'NONE', '#6699cc', 'NONE') | |
call NERDTreeHighlightFile('ds_store', 'Gray', 'NONE', '#686868', 'NONE') | |
call NERDTreeHighlightFile('gitconfig', 'black', 'NONE', '#686868', 'NONE') | |
call NERDTreeHighlightFile('gitignore', 'Gray', 'NONE', '#7F7F7F', 'NONE') | |
" }}} | |
" nerdtree-git-plugin {{{ | |
let g:NERDTreeIndicatorMapCustom = { | |
\ "Modified" : "✹", | |
\ "Staged" : "✚", | |
\ "Untracked" : "✭", | |
\ "Renamed" : "➜", | |
\ "Unmerged" : "═", | |
\ "Deleted" : "✖", | |
\ "Dirty" : "✗", | |
\ "Clean" : "✔︎", | |
\ "Unknown" : "?" | |
\ } | |
" }}} | |
" emmet-vim {{{ | |
imap <C-e> <plug>(emmet-expand-abbr) | |
" }}} | |
" vim-shell {{{ | |
let g:shell_fullscreen_message = 0 | |
let g:shell_fullscreen_always_on_top = 0 | |
nmap <C-CR> :Fullscreen<CR> | |
" }}} | |
" vim-easymotion {{{ | |
let g:EasyMotion_keys='hklyuiopnm,qwertzxcvbasdgjf' | |
nmap s <Plug>(easymotion-s) | |
" }}} | |
" OmniSharp {{{ | |
let g:OmniSharp_selector_ui = 'unite' " Use unite.vim | |
let g:OmniSharp_selector_ui = 'ctrlp' " Use ctrlp.vim | |
" }}} | |
" denite/ctrlp {{{ | |
if g:settings.uniteinterface == 'denite' | |
call denite#custom#map('_', "\<C-c>", 'quit') | |
call denite#custom#map('_', "\<C-j>", 'move_to_next_line') | |
call denite#custom#map('_', "\<C-k>", 'move_to_prev_line') | |
nnoremap <Leader>ft :Denite filetype<CR> | |
nnoremap <Leader>cs :Denite colorscheme<CR> | |
elseif g:settings.uniteinterface == 'ctrlp' | |
nnoremap <Leader>ft :CtrlPFiletype<CR> | |
nnoremap <Leader>cs :CtrlPColorscheme<CR> | |
endif | |
" }}} | |
" autocomplete {{{ | |
if g:settings.completionlib == 'deoplete' | |
let g:deoplete#enable_at_startup=1 | |
let g:deoplete#auto_completion_start_length=1 | |
let g:deoplete#enable_smart_case = 1 | |
let g:deoplete#data_directory=g:settings.cache . '/deoplete' | |
let g:deoplete#enable_ignore_case='ignorecase' | |
let g:deoplete#omni#functions = {} | |
let g:deoplete#omni#functions.javascript = [] | |
elseif g:settings.completionlib == 'neocomplete' | |
let g:neocomplete#data_directory = g:settings.cache . '/neocomplete' | |
let g:neocomplete#enable_at_startup = 1 | |
let g:neocomplete#enable_smart_case = 1 | |
let g:neocomplete#sources#synatx#min_keyword_length=1 | |
if !exists('g:neocomplete#keyword_patters') | |
let g:neocomplete#keyword_patterns = {} | |
endif | |
let g:neocomplete#keyword_patterns['default'] = '\h\w*' | |
endif | |
let g:UltiSnipsExpandTrigger="<C-e>" | |
" <Tab> completion | |
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" | |
" inoremap <expr><S-Tab> pumvisible() ? "\<C-p>" : "\<C-h>" | |
" Movement within 'ins-completion-menu' | |
imap <expr><C-j> pumvisible() ? "\<C-n>" : "\<C-j>" | |
imap <expr><C-k> pumvisible() ? "\<C-p>" : "\<C-k>" | |
" Scroll pages in menu | |
inoremap <expr><C-f> pumvisible() ? "\<PageDown>\<C-p>\<C-n>" : "\<Right>" | |
inoremap <expr><C-b> pumvisible() ? "\<PageUp>\<C-p>\<C-n>" : "\<Left>" | |
imap <expr><C-d> pumvisible() ? "\<PageDown>\<C-p>\<C-n>" : "\<C-d>" | |
imap <expr><C-u> pumvisible() ? "\<PageUp>\<C-p>\<C-n>" : "\<C-u>" | |
" close the preview window when you're not using it | |
let g:SuperTabClosePreviewOnPopupClose = 1 | |
" set ballooneval | |
if !empty(g:settings.completionlib) | |
" Undo completion | |
inoremap <expr><C-g> g:settings.completionlib == 'deoplete' ? deoplete#mappings#undo_completion() : neocomplete#undo_completion() | |
" Redraw candidates | |
if g:settings.completionlib == 'deoplete' | |
inoremap <expr><C-l> deoplete#mappings#refresh() | |
endif | |
endif | |
" }}} | |
" syntastic {{{ | |
let g:syntastic_error_symbol = '✗✗' | |
let g:syntastic_style_error_symbol = '✠✠' | |
let g:syntastic_warning_symbol = '∆∆' | |
let g:syntastic_style_warning_symbol = '≈≈' | |
" }}} | |
" tsuquyomi {{{ | |
" let g:tsuquyomi_disable_quickfix = 1 | |
" let g:syntastic_typescript_checkers = ['tsuquyomi'] | |
" }}} | |
au FileType html setlocal expandtab | |
" Use local vimrc if available {{{ | |
if filereadable(expand("~/.vimrc.local")) | |
source ~/.vimrc.local | |
endif | |
" }}}} | |
" vim: set sw=2 ts=2 sts=2 et tw=78 foldmarker={{{,}}} foldlevel=0 foldmethod=marker spell: |
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
# curl https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/.zshrc -o ~/.zshrc | |
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="babun" | |
# use agnoster if you want powerlines | |
#ZSH_THEME="agnoster" | |
plugins=(colored-man docker git jake-node jump npm nvm z) | |
source $ZSH/oh-my-zsh.sh | |
# User configuration | |
export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# You may need to manually set your language environment | |
# export LANG=en_US.UTF-8 | |
# Preferred editor for local and remote sessions | |
# if [[ -n $SSH_CONNECTION ]]; then | |
# export EDITOR='vim' | |
# else | |
# export EDITOR='mvim' | |
# fi | |
# Compilation flags | |
# export ARCHFLAGS="-arch x86_64" | |
# enable vi bindings | |
bindkey -v | |
bindkey -M viins 'jj' vi-cmd-mode | |
stty -ixon |
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
#!/bin/zsh | |
# curl https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/babun-post-install | zsh | |
successfully() { | |
$* || (echo "\nfailed" 1>&2 && exit 1) | |
} | |
fancy_echo() { | |
echo "\n$1" | |
} | |
fancy_echo "Updating babun" | |
successfully pact update | |
fancy_echo "Updating ~/.zshrc" | |
successfully curl https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/.zshrc -o ~/.zshrc | |
fancy_echo "Installing tmux" | |
successfully pact install tmux | |
fancy_echo "Installing solarized dark theme and powerconsolas for mintty" | |
successfully curl https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/.minttyrc -o ~/.minttyrc | |
fancy_echo "Installing the_silver_searcher (ag)" | |
successfully pact install automake pkg-config libpcre-devel liblzma-devel | |
successfully git clone https://github.com/ggreer/the_silver_searcher ~/ag | |
successfully pushd ~/ag | |
successfully bash -x -o igncr ./build.sh && make install | |
successfully cd .. | |
successfully rm -rf ~/ag | |
successfully popd | |
fanyc_echo "Updating gitconfig" | |
successfully git config --global core.autocrlf true | |
successfully git config --global user.name "prabirshrestha" | |
successfully git config --global user.email "[email protected]" | |
echo "execute 'chere -i -t mintty' in admin mode to enable Zsh Prompt Here" | |
source ~/.zshrc | |
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
# INFO: http://mintty.googlecode.com/svn/trunk/docs/mintty.1.html#HEAD | |
Transparency=2 | |
OpaqueWhenFocused=1 | |
FontHeight=11 | |
BoldAsColour=1 | |
Columns=100 | |
Rows=40 | |
# Note: you need xterm-256color | |
Term=xterm-256color | |
CursorType=1 | |
# Zenburn scheme - Source: http://slinky.imukuppi.org/zenburnpage/ | |
CursorColour=191,191,191 | |
ForegroundColour=220,220,204 | |
BackgroundColour=63,63,63 | |
Black=63,63,63 | |
Red=112,80,80 | |
Green=96,180,138 | |
Yellow=223,175,143 | |
Blue=80,96,112 | |
Magenta=220,140,195 | |
Cyan=140,208,211 | |
White=220,220,204 | |
BoldBlack=112,144,128 | |
BoldRed=220,163,163 | |
BoldGreen=195,191,159 | |
BoldYellow=240,223,175 | |
BoldBlue=148,191,243 | |
BoldMagenta=236,147,211 | |
BoldCyan=147,224,227 | |
BoldWhite=255,255,255 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment