Skip to content

Instantly share code, notes, and snippets.

@umayr
Forked from prabirshrestha/.bash_profile
Last active August 29, 2015 14:07
Show Gist options
  • Save umayr/03fdcea6d1a8922a1a62 to your computer and use it in GitHub Desktop.
Save umayr/03fdcea6d1a8922a1a62 to your computer and use it in GitHub Desktop.
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
# 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"
" lua-windows: http://sourceforge.net/projects/luabinaries/files/5.2.3/Windows%20Libraries/Dynamic/
" must be first line
set nocompatible
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 s:is_sudo = $SUDO_USER != '' && $USER !=# $SUDO_USER
\ && $HOME !=# expand('~'.$USER)
\ && $HOME ==# expand('~'.$SUDO_USER)
" define and reset augroup used in vimrc
augroup vimrc
autocmd!
augroup END
if s:is_win
set shellslash " exchange path separator
endif
let $CACHE=expand('~/.vim')
if !isdirectory(expand($CACHE))
call mkdir(expand($CACHE), 'p')
endif
if !filereadable(expand('$CACHE/vim-plug/README.md'))
echo "Installing vim-plug ..."
echo ""
execute printf('!git clone %s://github.com/junegunn/vim-plug',
\ (exists('$http_proxy') ? 'https' : 'git'))
\ expand('$CACHE/vim-plug')
execute printf('source %s', expand('$CACHE/vim-plug/plug.vim'))
endif
execute printf('source %s', expand('$CACHE/vim-plug/plug.vim'))
call plug#begin(expand('$CACHE/plugged'))
Plug 'altercation/vim-colors-solarized'
Plug 'bling/vim-airline'
Plug 'xolox/vim-misc'
Plug 'tyru/open-browser.vim'
Plug 'Shougo/neocomplete.vim'
Plug 'DataWraith/auto_mkdir'
Plug 'Lokaltog/vim-easymotion'
Plug 'amirh/HTML-AutoCloseTag', { 'for': 'html' }
Plug 'ctrlpvim/ctrlp.vim'
Plug 'elzr/vim-json', { 'for': 'json' }
Plug 'nathanaelkane/vim-indent-guides'
Plug 'scrooloose/nerdtree', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] }
Plug 'spf13/vim-autoclose'
" Plug 'tpope/vim-fugitive', { 'on': [ 'Gstatus', 'Gdiff', 'Gcommit', 'Gblame', 'Glog', 'Git push', 'Gread', 'Gwrite', 'Gedit' ] }
Plug 'tpope/vim-fugitive'
Plug 'gregsexton/gitv', { 'on': 'Gitv' }
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-commentary', { 'on': '<Plug>Commentary' }
Plug 't9md/vim-choosewin', { 'on': '<Plug>(choosewin)' }
Plug 'yonchu/accelerated-smooth-scroll'
Plug 'terryma/vim-multiple-cursors'
Plug 'szw/vim-g', { 'on': [ 'Google', 'Googlef' ] }
Plug 'xolox/vim-shell', { 'on': [ 'Fullscreen', 'Maximize', 'Open', 'MakeWithShell' ] }
Plug 'xolox/vim-session'
Plug 'ervandew/supertab'
Plug 'rking/ag.vim', { 'on': 'Ag' }
Plug 'airblade/vim-rooter'
Plug 'vim-scripts/text-object-left-and-right'
Plug 'michaeljsmith/vim-indent-object'
Plug 'justinmk/vim-gtfo'
Plug 'ciaranm/detectindent'
Plug 'tacahiroy/ctrlp-funky', { 'on': 'CtrlPFunky' }
Plug 'ompugao/ctrlp-history', { 'on': ['CtrlPCmdHistory', 'CtrlPSearchHistory'] }
Plug 'endel/ctrlp-filetype.vim', { 'on': 'CtrlPFiletype' }
Plug 'mattn/httpstatus-vim', { 'on': 'CtrlPHttpStatus' }
Plug 'mattn/ctrlp-google', { 'on': 'CtrlPGoogle' }
Plug 'mattn/ctrlp-hackernews', { 'on': 'CtrlPHackerNews' }
Plug 'mattn/ctrlp-register', { 'on': 'CtrlPRegister'}
Plug 'mattn/ctrlp-vimpatches', { 'on': 'CtrlPVimPatches'}
Plug 'mattn/ctrlp-git', { 'on': ['CtrlPGitFiles', 'CtrlPGitBranch'] }
Plug 'hara/ctrlp-href'
Plug 'mattn/ctrlp-google', { 'on': 'CtrlPGoogle'}
Plug 'scrooloose/syntastic'
Plug 'chrisbra/csv.vim', { 'for': 'csv' }
Plug 'godlygeek/tabular', { 'on': 'Tabularize' }
Plug 'matchit.zip'
Plug 'mattn/webapi-vim'
Plug 'tpope/vim-repeat'
Plug 'tyru/restart.vim', { 'on': 'Restart' }
Plug 'junegunn/goyo.vim', { 'on': 'Goyo' }
Plug 'junegunn/limelight.vim', { 'on': 'Limelight' }
Plug 'mbbill/undotree', { 'on': 'UndotreeToggle' }
Plug 'justinmk/vim-gtfo'
Plug 'airblade/vim-gitgutter'
Plug 'groenewege/vim-less', { 'for': 'less' }
Plug 'jelera/vim-javascript-syntax', { 'for': 'javascript' }
Plug 'pangloss/vim-javascript', { 'for': 'javascript' }
Plug 'othree/javascript-libraries-syntax.vim', { 'for': 'javascript' }
Plug 'leafgarland/typescript-vim', { 'for': 'typescript' }
Plug 'plasticboy/vim-markdown', { 'for': 'mkd' }
call plug#end()
let &termencoding = &encoding
set encoding=utf-8
scriptencoding utf-8
set guifont=Consolas\ for\ Powerline\ FixedD:h11
" vim-colors-solarized {
set background=dark " Assume a dark background
let g:solarized_termcolors=256
let g:solarized_termtrans=1
let g:solarized_contrast="normal"
let g:solarized_visibility="normal"
colorscheme solarized
" }
" vim-airline {
if has('gui_running')
let g:airline_powerline_fonts=1
let g:airline#extensions#tabline#enabled = 0
let g:airline#extensions#tabline#fnamemod = ':t'
let g:Powerline_symbols="fancy"
let g:airline_symbols = {}
let g:airline_left_sep = "\u2b80" "use double quotes here
let g:airline_left_alt_sep = "\u2b81"
let g:airline_right_sep = "\u2b82"
let g:airline_right_alt_sep = "\u2b83"
let g:airline_symbols.branch = "\u2b60"
let g:airline_symbols.readonly = "\u2b64"
let g:airline_symbols.linenr = "\u2b61"
else
if s:is_win
let g:airline_theme = 'zenburn'
endif
endif
set shortmess+=fIlmnrxoOtT " Abbrev. of messages (avoids 'hit enter')
" }
" General {
filetype plugin indent on " Automatically detect file types.
syntax on " Syntax highlighting
set mouse=a " Automatically enable mouse usage
set mousehide " Hide the mouse cursor while typing
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
let mapleader = ','
let maplocalleader = '_'
" Remap fast jj to escape
inoremap jj <ESC>
inoremap jk <ESC>
inoremap kj <ESC>
" 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
set encoding=utf-8
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
set spell " Spell checking on
set spelllang=en_us " Set en-us as default language
set spellsuggest=best,5
set hidden " Allow buffer switching without saving
" Setting up the directories
set backup
if has('persistent_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 laststatus=2 " Show status line
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>
function! InitializeDirectories()
let parent = expand('$CACHE')
let prefix = 'vim'
let dir_list = {
\ 'backup': 'backupdir',
\ 'views': 'viewdir',
\ 'swap': 'directory' }
if has('persistent_undo')
let dir_list['undo'] = 'undodir'
endif
let common_dir = parent . '/.' . prefix
for [dirname, settingname] in items(dir_list)
let directory = common_dir . dirname . '/'
if exists("*mkdir")
if !isdirectory(directory)
call mkdir(directory)
endif
endif
if !isdirectory(directory)
echo "Warning: Unable to create backup directory: " . directory
echo "Try: mkdir -p " . directory
else
let directory = substitute(directory, " ", "\\\\ ", "g")
exec "set " . settingname . "=" . directory
endif
endfor
endfunction
call InitializeDirectories()
" }
" pseudokeys {
nnoremap [pseudokey] <Nop>
nmap <space> [pseudokey]
nnoremap <silent> [pseudokey]ev :<C-u>edit $MYVIMRC<CR>
nnoremap <silent> [pseudokey]p :<C-u>call ToggleOption('paste')<CR>
nnoremap <silent> [pseudokey]w :<C-u>call ToggleOption('wrap')<CR>
nnoremap <silent> [pseudokey]sp :<C-u>call ToggleOption('spelling')<CR>
nnoremap <silent> [pseudokey]ln :<C-u>call ToggleOption('relativenumber')<CR>
nnoremap <silent> [pseudokey]t2 :<C-u>setl shiftwidth=2 softtabstop=2<CR>
nnoremap <silent> [pseudokey]t4 :<C-u>setl shiftwidth=4 softtabstop=4<CR>
nnoremap <silent> [pseudokey]t8 :<C-u>setl shiftwidth=8 softtabstop=8<CR>
" Toggle options. " {
function! ToggleOption(option_name)
execute 'setlocal' a:option_name.'!'
execute 'setlocal' a:option_name.'?'
endfunction "}
" Toggle variables. "{
function! ToggleVariable(variable_name)
if eval(a:variable_name)
execute 'let' a:variable_name.' = 0'
else
execute 'let' a:variable_name.' = 1'
endif
echo printf('%s = %s', a:variable_name, eval(a:variable_name))
endfunction "}
" }
" NERDTree {
nnoremap <silent> <C-e> :NERDTreeToggle<CR>
nnoremap <silent> <leader>n :NERDTreeFind<CR>
let NERDTreeQuitOnOpen=0
let NERDTreeShowBookmarks=1
let NERDTreeShowHidden=1
let NERDTreeMouseMode=2
" }
" Ctrlp {
map <silent> <C-p> :CtrlP<CR>
let g:ctrlp_cache_dir = expand('$CACHE/ctrlp')
let g:ctrlp_max_files = 99999
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_extensions = [ 'tag', 'buffertag', 'quickfix', 'dir', 'rtscript', 'undo', 'line', 'changes', 'mixed', 'bookmarkdir',
\ 'funky', 'filetype', 'hackernews', 'session', 'register', 'vimpatches', 'href', 'google']
nnoremap <silent> [pseudokey]f :CtrlP<CR>
nnoremap <silent> [pseudokey]ft :CtrlPFiletype<CR>
nnoremap <silent> [pseudokey]m :CtrlPMixed<CR>
nnoremap <silent> [pseudokey]o :CtrlPFunky<CR>
nnoremap <silent> [pseudokey]r :CtrlPMRU<CR>
nnoremap <silent> [pseudokey]t :CtrlPBufTagAll<CR>
nnoremap <silent> [pseudokey]hn :CtrlPHackerNews<CR>
nnoremap <silent> [pseudokey]hsc :CtrlPHttpStatus<CR>
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\.hg$\|node_modules$\|\.svn$\|out$\|objd$',
\ 'file': '\.exe$\|\.exe.config$\|\.so$\|\.dll$\|\.pdb$\|\.pyc$' }
" }
" tabular {
nmap <Leader>a& :Tabularize /&<CR>
vmap <Leader>a& :Tabularize /&<CR>
nmap <Leader>a= :Tabularize /=<CR>
vmap <Leader>a= :Tabularize /=<CR>
nmap <Leader>a: :Tabularize /:<CR>
vmap <Leader>a: :Tabularize /:<CR>
nmap <Leader>a:: :Tabularize /:\zs<CR>
vmap <Leader>a:: :Tabularize /:\zs<CR>
nmap <Leader>a, :Tabularize /,<CR>
vmap <Leader>a, :Tabularize /,<CR>
nmap <Leader>a,, :Tabularize /,\zs<CR>
vmap <Leader>a,, :Tabularize /,\zs<CR>
nmap <Leader>a<Bar> :Tabularize /<Bar><CR>
vmap <Leader>a<Bar> :Tabularize /<Bar><CR>
" }
" fugitive {
nnoremap <silent> <leader>gs :Gstatus<CR>
nnoremap <silent> <leader>gd :Gdiff<CR>
nnoremap <silent> <leader>gc :Gcommit<CR>
nnoremap <silent> <leader>gb :Gblame<CR>
nnoremap <silent> <leader>gl :Glog<CR>
nnoremap <silent> <leader>gp :Git push<CR>
nnoremap <silent> <leader>gr :Gread<CR>
nnoremap <silent> <leader>gw :Gwrite<CR>
nnoremap <silent> <leader>ge :Gedit<CR>
" }
" gitv {
nnoremap <silent> <leader>gk :Gitv<CR>
" }
" vim-indent-guides {
let g:indent_guides_start_level=2
let g:indent_guides_guide_size=1
let g:indent_guides_enable_on_vim_startup=1
" }
" vim-commentary {
map gc <Plug>Commentary
nmap gcc <Plug>CommentaryLine
" }
" vim-gitgutter {
nmap gh <Plug>GitGutterNextHunk
nmap gph <Plug>GitGutterPrevHunk
" }
" goyo.vim {
function! s:goyo_enter()
if has('gui_running')
set fullscreen
set linespace=7
elseif exists('$TMUX')
silent !tmux set status off
endif
set scrolloff=999
Limelight
endfunction
function! s:goyo_leave()
if has('gui_running')
set nofullscreen
set linespace=0
elseif exists('$TMUX')
silent !tmux set status on
endif
set scrolloff=5
Limelight!
endfunction
autocmd! User GoyoEnter
autocmd! User GoyoLeave
autocmd User GoyoEnter nested call <SID>goyo_enter()
autocmd User GoyoLeave nested call <SID>goyo_leave()
nnoremap <Leader>G :Goyo<CR>
nnoremap <silent> [pseudokey]g :<C-u>:Goyo<CR>
" }
" undotree {
let g:undotree_WindowLayout = 2
nnoremap <silent> [pseudokey]u :<C-u>:UndotreeToggle<CR>
" }
" vim-markdown {
let g:vim_markdown_folding_disabled = 1
" }
" vim-shell {
let g:shell_fullscreen_message = 0
let g:shell_fullscreen_always_on_top = 0
nmap <C-CR> :Fullscreen<CR>
" }
" vim-easymotion {
" Bi-directional find motion
" Jump to anywhere you want with minimal keystrokes, with just one key binding.
" `s{char}{label}`
let g:EasyMotion_keys='hklyuiopnm,qwertzxcvbasdgjf'
nmap s <Plug>(easymotion-s)
" }
" vim-session {
let g:session_directory = expand('$CACHE/vim-session')
let g:session_autosave = 'yes'
let g:session_autoload = 'no'
nnoremap <silent> [pseudokey]s :<C-u>:OpenSession<CR>
" }"
" syntastic {
let g:syntastic_check_on_open=0
let g:syntastic_check_on_wq = 0
let g:syntastic_typescript_checkers=['']
" }"
" javascript-libraries-syntax.vim {
let g:used_javascript_libs = 'jquery,underscore,requirejs'
" }
" neocomplete {
let g:neocomplete#data_directory = expand('$CACHE/neocomplete')
let g:acp_enableAtStartup = 0
let g:neocomplete#enable_at_startup = 1
let g:neocomplete#enable_fuzzy_completion = 1
let g:neocomplete#enable_camel_case = 1
let g:neocomplete#enable_smart_case = 1
let g:neocomplete#sources#syntax#min_keyword_length = 1
" Define keyword.
if !exists('g:neocomplete#keyword_patterns')
let g:neocomplete#keyword_patterns = {}
endif
let g:neocomplete#keyword_patterns['default'] = '\h\w*'
" 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 xml setlocal omnifunc=xmlcomplete#CompleteTags
" Enable heavy omni completion.
if !exists('g:neocomplete#sources#omni#input_patterns')
let g:neocomplete#sources#omni#input_patterns = {}
endif
" }
" supertab {
let g:SuperTabDefaultCompletionType = "context" " must be after omnicompletion
" }"
au BufRead,BufNewFile web.config set filetype=xml
# 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
#!/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 "mail@prabir.me"
echo "execute 'chere -i -t mintty' in admin mode to enable Zsh Prompt Here"
source ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment