Skip to content

Instantly share code, notes, and snippets.

@bspavel
Forked from prabirshrestha/.bash_profile
Created July 21, 2019 17:57
Show Gist options
  • Save bspavel/d246f4e8405f0c65c809e020500e9b9d to your computer and use it in GitHub Desktop.
Save bspavel/d246f4e8405f0c65c809e020500e9b9d to your computer and use it in GitHub Desktop.
my terminal settings for windows
# curl -Lk https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/071a7d7060ba2b76603231f962d2240ed6bf0312/.bash_profile -o ~/.bash_profile
[[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh # This loads NVM
export PATH="$HOME/.cargo/bin:$HOME/go/bin:$HOME/Library/Python/3.7/bin:$PATH"
export PATH="$HOME/.config/nvim/plugins/vim-themis/bin:$PATH"
stty -ixon
# alias
alias ls='ls -Gp'
alias vi='nvim'
alias v='vim'
# git alias
alias g='git'
alias ga='git add'
alias gb='git branch'
alias gba='git branch -a'
alias gca='git commit -a'
alias gclean='git clean -xdf'
alias gcm='git checkout master'
alias gco='git checkout'
alias gcp='git cherry-pick'
alias gf='git fetch'
alias gl='git log --oneline --graph --decorate'
alias gm='git merge'
alias gmt='git mergetool'
alias gp='git push origin HEAD'
alias gs='git status'
alias gup='git fetch && git rebase'
gpr() {
git fetch origin pull/${1}/head:pr${1}
git checkout pr${1}
}
# fe [FUZZY PATTERN] - Open the selected file with the default editor
# - Bypass fuzzy finder if there's only one match (--select-1)
# - Exit if there's no match (--exit-0)
fe() {
local files
IFS=$'\n' files=($(fzf-tmux --query="$1" --multi --select-1 --exit-0))
[[ -n "$files" ]] && ${EDITOR:-vim} "${files[@]}"
}
# fd - cd to selected directory
fd() {
local dir
dir=$(find ${1:-.} -path '*/\.*' -prune \
-o -type d -print 2> /dev/null | fzf +m) &&
cd "$dir"
}
# fcs - get git commit sha
# example usage: git rebase -i `fcs`
fcs() {
local commits commit
commits=$(git log --color=always --pretty=oneline --abbrev-commit --reverse) &&
commit=$(echo "$commits" | fzf --tac +s +m -e --ansi --reverse) &&
echo -n $(echo "$commit" | sed "s/ .*//")
}
# fstash - easier way to deal with stashes
# type fstash to get a list of your stashes
# enter shows you the contents of the stash
# ctrl-d shows a diff of the stash against your current HEAD
# ctrl-b checks the stash out as a branch, for easier merging
fstash() {
local out q k sha
while out=$(
git stash list --pretty="%C(yellow)%h %>(14)%Cgreen%cr %C(blue)%gs" |
fzf --ansi --no-sort --query="$q" --print-query \
--expect=ctrl-d,ctrl-b);
do
mapfile -t out <<< "$out"
q="${out[0]}"
k="${out[1]}"
sha="${out[-1]}"
sha="${sha%% *}"
[[ -z "$sha" ]] && continue
if [[ "$k" == 'ctrl-d' ]]; then
git diff $sha
elif [[ "$k" == 'ctrl-b' ]]; then
git stash branch "stash-$sha" $sha
break;
else
git stash show -p $sha
fi
done
}
[core]
# git config --global core.commentchar ;
[diff]
tool = kdiff3
[difftool "kdiff3"]
path = c:/Program Files/KDiff3/kdiff3.exe
#path = /Applications/kdiff3.app/Contents/MacOS/kdiff3
[merge]
tool = kdiff3
[mergetool "kdiff3"]
path = c:/Program Files/KDiff3/kdiff3.exe
#path = /Applications/kdiff3.app/Contents/MacOS/kdiff3
keepBackup = false
trustExitCode = false
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
bind-key -n C-Space send-keys C-Space
# enable pretty colors
set-option -ga terminal-overrides ",xterm-256color:Tc"
# 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 -g mouse 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
# panes
set -g pane-border-fg black
set -g pane-active-border-fg brightred
## Status bar design
# status line
set -g status-justify left
set -g status-bg default
set -g status-fg colour12
set -g status-interval 2
# messaging
set -g message-fg black
set -g message-bg yellow
set -g message-command-fg blue
set -g message-command-bg black
#window mode
setw -g mode-bg colour6
setw -g mode-fg colour0
# window status
setw -g window-status-format " #F#I:#W#F "
setw -g window-status-current-format " #F#I:#W#F "
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
setw -g window-status-current-bg colour0
setw -g window-status-current-fg colour11
setw -g window-status-current-attr dim
setw -g window-status-bg green
setw -g window-status-fg black
setw -g window-status-attr reverse
# Info on left (I don't have a session display for now)
set -g status-left ''
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
set -g default-terminal "screen-256color"
# The modes {
setw -g clock-mode-colour colour135
setw -g mode-attr bold
setw -g mode-fg colour196
setw -g mode-bg colour238
# }
# The panes {
set -g pane-border-bg colour235
set -g pane-border-fg colour238
set -g pane-active-border-bg colour236
set -g pane-active-border-fg colour51
# }
# The statusbar {
set -g status-position bottom
set -g status-bg colour234
set -g status-fg colour137
set -g status-attr dim
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-fg colour81
setw -g window-status-current-bg colour238
setw -g window-status-current-attr bold
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
setw -g window-status-fg colour138
setw -g window-status-bg colour235
setw -g window-status-attr none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-attr bold
setw -g window-status-bell-fg colour255
setw -g window-status-bell-bg colour1
# }
# The messages {
set -g message-attr bold
set -g message-fg colour232
set -g message-bg colour166
# }
" curl -Lk https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/.vimrc -o ~/.vimrc
" to use existing vim configuration as neovim configuration
" ln -s ~/.vimrc ~/.config/nvim/init.vim
" For windows download lua binaries from https://sourceforge.net/projects/luabinaries/files/5.3.3/Windows%20Libraries/Dynamic/lua-5.3.3_Win64_dll11_lib.zip/download
" Fro mac: brew install vim --HEAD --with-override-system-vi --with-luajit --with-python3 --with-tcl --with-gettext --enable-gui --with-client-server
set nocompatible
set encoding=utf-8
scriptencoding utf-8
set fileformats=unix,mac,dos
set termencoding=utf-8
syntax on
filetype plugin indent on
set backspace=indent,eol,start
set nobackup noswapfile
let mapleader = ' '
nnoremap ; :
if has('win32') | set shellslash | endif
" vimrc {{{
nnoremap <leader>ev :e $MYVIMRC<cr>
nnoremap <leader>sv :source $MYVIMRC<cr>
" }}}
let s:settings = {
\ 'data_dir': expand('~/.config/nvim/data'),
\ 'plugins_dir': expand('~/.config/nvim/plugins'),
\ 'vim_plug_script_path': expand('~/.config/nvim/plug.vim'),
\ 'auto_install_plugins': 0,
\ }
let s:settings['vim_plug_script_path'] = expand('~/.config/nvim/plug.vim')
let s:settings['plugins_dir'] = expand('~/.config/nvim/plugins')
if !filereadable(s:settings['vim_plug_script_path'])
if !executable('curl') | echom 'curl required to download vim-plug' | endif
if has('win32') && &shellslash
let s:settings['vim_plug_script_path'] = substitute(s:settings['vim_plug_script_path'], '/', '\\', 'g')
endif
execute 'silent !curl -fkLo "' . s:settings['vim_plug_script_path'] . '" --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
let s:settings['auto_install_plugins'] = 1
endif
execute 'source ' . s:settings['vim_plug_script_path']
call plug#begin(s:settings['plugins_dir'])
Plug 'iCyMind/NeoSolarized'
Plug 'lifepillar/vim-solarized8'
Plug 'luochen1990/rainbow'
Plug 'thinca/vim-themis', { 'on': [] }
Plug 'sheerun/vim-polyglot'
Plug 'DataWraith/auto_mkdir'
Plug 'Lokaltog/vim-easymotion', { 'on': ['<Plug>(easymotion-s)'] }
Plug 'airblade/vim-rooter'
Plug 'alvan/vim-closetag'
Plug 'cohama/lexima.vim'
Plug 'justinmk/vim-gtfo'
Plug 'lambdalisue/gina.vim'
Plug 'cohama/agit.vim', { 'on': ['Agit', 'AgitFile'] }
Plug 'mattn/emmet-vim'
Plug 'sgur/vim-editorconfig'
Plug 'tpope/vim-commentary'
Plug 'scrooloose/nerdtree', { 'on': ['NERDTreeFind', 'NERDTreeToggle'] }
Plug 'lambdalisue/fila.vim'
Plug 'diepm/vim-rest-console'
Plug 'mhinz/vim-grepper', { 'on': ['Grepper', '<plug>(GrepperOperator)'] }
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'yami-beta/asyncomplete-omni.vim'
Plug 'prabirshrestha/asyncomplete-buffer.vim'
Plug 'Shougo/neco-syntax' | Plug 'prabirshrestha/asyncomplete-necosyntax.vim'
Plug 'Shougo/neco-vim' | Plug 'prabirshrestha/asyncomplete-necovim.vim'
Plug 'OmniSharp/omnisharp-vim', { 'for': ['cs'] }
Plug 'prabirshrestha/quickpick.vim'
Plug 'prabirshrestha/quickpick-colorschemes.vim'
Plug 'prabirshrestha/quickpick-filetypes.vim'
Plug 'prabirshrestha/quickpick-npm.vim'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'dbeecham/ctrlp-commandpalette.vim', { 'on': ['CtrlPCommandPalette'] }
Plug 'okcompute/vim-ctrlp-session'
if has('python') || has('python3')
Plug 'FelikZ/ctrlp-py-matcher'
endif
Plug 'mattn/vim-fz'
Plug 'mhinz/vim-lookup', { 'for': 'vim' }
Plug 'shime/vim-livedown', { 'on': ['LivedownPreview', 'LivedownKill', 'LivedownToggle'], 'do': 'npm install -g livedown' }
" Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }}
Plug 'markonm/traces.vim'
Plug 'troydm/zoomwintab.vim'
Plug 'prabirshrestha/split-term.vim', { 'branch': 'vim8', 'on': ['Term', 'VTerm', 'TTerm'] }
if has('nvim') | Plug 'equalsraf/neovim-gui-shim' | endif
call plug#end()
if s:settings['auto_install_plugins']
autocmd VimEnter * PlugClean! | PlugUpdate --sync
endif
" ui
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
if has('termguicolors') | set termguicolors | endif
set background=dark
silent! colorscheme solarized8
if has('directx') | set renderoptions=type:directx | endif
if has('gui_running')
set guioptions=Mc!
endif
set guifont=Fira\ Code\ Retina:h12
" if has('gui_macvim')
" set guifont=Ubuntu\ Mono\ Nerd\ Font\ Complete\ Mono\ Windows\ Compatible:h15
" else
" set guifont=UbuntuMono_NF:h12:cANSI:qDRAFT
" endif
set mouse=a " automatically enable mouse usage
set noerrorbells visualbell t_vb= " no annoying sound on errors
set shortmess+=OI
set nu " set line numbers on
set completeopt+=noinsert,noselect
set completeopt-=preview " disable autocomplete preview
set wildmenu " show list instead of just completing
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)
set signcolumn=yes " always enable signcoumn
" Move up and down in autocomplete with <c-j> and <c-k>
inoremap <expr> <C-j> ("\<C-n>")
inoremap <expr> <C-k> ("\<C-p>")
" Highlight problematic whitespace
set listchars=tab:›\ ,trail:•,extends:#,nbsp:.
set showbreak=···
set incsearch " find as you type
set hlsearch " highlight search terms
set ignorecase " case in-sensitive search
set smartcase " case sensitive when upper case present
" Clear current search highlighting by fast //
nmap <silent> // :nohlsearch<CR>
set clipboard+=unnamed " always use system clipboard
" Visual shifting (does not exit Visual mode)
vnoremap < <gv
vnoremap > >gv
" 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>
nnoremap <c-s> :w<CR>
inoremap <c-s> <esc>:w<CR>i
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>
" terminal {{{
" if has('terminal') || has('nvim')
" function! s:open_term(args, count, vertical) abort
" let l:params = split(a:args)
" let l:cmd = a:vertical ? 'vnew' : 'new'
" let l:cmd = a:count ? a:count . l:cmd : l:cmd
" exe l:cmd
" if has('nvim')
" exe 'terminal' a:args
" else
" exe 'terminal ++curwin' a:args
" endif
" exe 'startinsert'
" endfunction
" command! -count -nargs=* Term call s:open_term(<q-args>, <count>, 0)
" command! -count -nargs=* VTerm call s:open_term(<q-args>, <count>, 1)
" tnoremap <Esc> <C-\><C-n>
" tnoremap <M-h> <c-\><c-n><c-w>h
" tnoremap <M-j> <c-\><c-n><c-w>j
" tnoremap <M-k> <c-\><c-n><c-w>k
" tnoremap <M-l> <c-\><c-n><c-w>l
" endif
" }}}
" Insert mode:
inoremap <M-h> <Esc><c-w>h
inoremap <M-j> <Esc><c-w>j
inoremap <M-k> <Esc><c-w>k
inoremap <M-l> <Esc><c-w>l
" Visual mode:
vnoremap <M-h> <Esc><c-w>h
vnoremap <M-j> <Esc><c-w>j
vnoremap <M-k> <Esc><c-w>k
vnoremap <M-l> <Esc><c-w>l
" Normal mode:
nnoremap <M-h> <c-w>h
nnoremap <M-j> <c-w>j
nnoremap <M-k> <c-w>k
nnoremap <M-l> <c-w>l
" vim-grepper {{{
nnoremap <Leader>s :Grepper -cword -highlight<CR>
" }}}
" vim-easymotion {{{
let g:EasyMotion_keys='hklyuiopnm,qwertzxcvbasdgjf'
nmap s <Plug>(easymotion-s)
" }}}
" quickpick.vim {{{
" }}}
if has_key(g:plugs, 'gina.vim')
let g:gina#command#blame#formatter#format = "%in %au %=on %ti"
nnoremap <leader>gb :Gina blame :<CR>
nnoremap <leader>gbr :Gina branch<CR>
nnoremap <leader>gd :Gina diff<CR>
nnoremap <leader>gl :Gina log<CR>
nnoremap <leader>gs :Gina status<CR>
nnoremap <leader>gc :Gina commit<CR>
let s:gina_cmd_opt = {'noremap': 1, 'silent': 1}
call gina#custom#mapping#nmap('blame', 'dd', '<Plug>(gina-diff-tab)')
call gina#custom#mapping#nmap('blame', 'ee', '<Plug>(gina-blame-echo)')
call gina#custom#mapping#nmap('log', 'dd', '<Plug>(gina-diff-tab)')
call gina#custom#mapping#nmap('status', '<C-]>', ':<C-U>Gina commit<CR>', s:gina_cmd_opt)
call gina#custom#mapping#nmap('/.*', 'q', ':<C-U>bd<CR>', s:gina_cmd_opt)
call gina#custom#mapping#nmap('/.*', '<C-t>', '<Plug>(gina-edit-tab)')
endif
" ctrlp.vim and vim-fz {{{
let g:ctrlp_cache_dir = expand(s:settings['data_dir'] . '/ctrlp')
let g:ctrlp_session_path = expand(s:settings['data_dir'] . './ctrlp-sessions')
let g:ctrlp_clear_cache_on_exit = 0
if has('python') || has('python3')
let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' }
endif
" vim-fz {{{
if executable('fzf')
nmap ,f <Plug>(fz)
let g:fz_command = 'fzf'
let g:fz_command_files = ''
let g:fz_command_options_action = '--expect=%s'
let g:ctrlp_map = ''
nnoremap <C-p> :call fz#run({ 'type': 'cmd', 'cmd': 'git ls-files' })<CR>
else
endif
" }}}
nnoremap <leader>r :CtrlPMRUFiles<CR>
nnoremap <leader>qf :cclose <CR>:CtrlPQuickfix<CR>
" }}}
" asyncomplete.vim and vim-lsp {{{
" let g:lsp_log_verbose = 1
" let g:lsp_log_file = expand(s:settings['data_dir'] . '/lsp.log')
" let g:asyncomplete_log_file = expand(s:settings['data_dir'] . '/asyncomplete.log')
let g:lsp_virtual_text_enabled = 1
let g:asyncomplete_auto_popup = 1
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" inoremap <expr> <cr> pumvisible() ? "\<C-y>\<cr>" : "\<cr>"
inoremap <expr> <CR> pumvisible() ? asyncomplete#close_popup() . "\<CR>" : "\<CR>"
inoremap <expr> <C-y> pumvisible() ? asyncomplete#close_popup() : "\<C-y>"
inoremap <expr> <C-e> pumvisible() ? asyncomplete#cancel_popup() : "\<C-e>"
" terminal vim treats c-@ as c-space, neovim doesn't understand c-@ so register both
" if !has('nvim') && !has('gui')
" imap <c-@> <Plug>(asyncomplete_force_refresh)
" endif
imap <c-space> <Plug>(asyncomplete_force_refresh)
let g:asyncomplete_force_refresh_on_context_changed = 1
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
let g:lsp_signs_enabled = 1
let g:lsp_diagnostics_echo_cursor = 1
let g:lsp_use_event_queue = 1
let s:asyncomplete_blacklist = []
augroup MyLspConfig
autocmd!
if executable('vim-language-server')
" npm i -g vim-language-server
let s:asyncomplete_blacklist += ['vim']
au User lsp_setup call lsp#register_server({
\ 'name': 'vim-language-server',
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'vim-language-server --stdio']},
\ 'whitelist': ['vim'],
\ })
autocmd FileType vim call s:configure_lsp()
autocmd FileType vim call s:configure_lsp()
endif
if executable('typescript-language-server')
" npm i -g typescript-language-server
let s:asyncomplete_blacklist += ['typescript', 'typescript.jsx']
au User lsp_setup call lsp#register_server({
\ 'name': 'typescript-language-server',
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']},
\ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'tsconfig.json'))},
\ 'whitelist': ['typescript', 'typescript.jsx'],
\ })
autocmd FileType javascript call s:configure_lsp()
autocmd FileType typescript,typescript.jsx call s:configure_lsp()
endif
if executable('css-languageserver')
" npm install -g vscode-css-languageserver-bin
let s:asyncomplete_blacklist += ['css', 'less', 'sass']
au User lsp_setup call lsp#register_server({
\ 'name': 'css-languageserver',
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'css-languageserver --stdio']},
\ 'whitelist': ['css', 'less', 'sass'],
\ })
endif
if executable('vscode-json-languageserver')
" npm install -g vscode-json-languageserver
let s:asyncomplete_blacklist += ['json']
au User lsp_setup call lsp#register_server({
\ 'name': 'json-languageserver',
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'vscode-json-languageserver --stdio']},
\ 'whitelist': ['json'],
\ })
autocmd FileType json call s:configure_lsp()
endif
if executable('wxml-langserver')
" npm install -g wxml-langserver
let s:asyncomplete_blacklist += ['xml']
au User lsp_setup call lsp#register_server({
\ 'name': 'wxml-languageserver',
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'wxml-langserver --stdio']},
\ 'whitelist': ['xml'],
\ })
autocmd FileType xml call s:configure_lsp()
endif
" https://github.com/prabirshrestha/vim-lsp/pull/318#issuecomment-475856672
" autocmd User lsp_setup call lsp#register_server({
" \ 'name': 'lsp4xml',
" \ 'cmd': {server_info->[
" \ 'java',
" \ '-jar',
" \ '/tmp/org.eclipse.lsp4xml-0.3.0-uber.jar'
" \ ]},
" \ 'whitelist': ['xml', 'arxml'],
" \ })
" let s:asyncomplete_blacklist += ['xml', 'arxml']
" autocmd FileType xml call s:configure_lsp()
if executable('pyls')
" pip install python-language-server
let s:asyncomplete_blacklist += ['python']
au User lsp_setup call lsp#register_server({
\ 'name': 'pyls',
\ 'cmd': {server_info->['pyls']},
\ 'whitelist': ['python'],
\ })
autocmd FileType python call s:configure_lsp()
endif
if executable('gopls')
" go get -u golang.org/x/tools/cmd/gopls
au User lsp_setup call lsp#register_server({
\ 'name': 'gopls',
\ 'cmd': {server_info->['gopls', '-mode', 'stdio']},
\ 'whitelist': ['go'],
\ })
autocmd FileType go call s:configure_lsp()
autocmd BufWritePre *.go LspDocumentFormatSync
endif
if executable('rls')
" refer to https://github.com/rust-lang-nursery/rls on how to setup rls
let s:asyncomplete_blacklist += ['rust']
au User lsp_setup call lsp#register_server({
\ 'name': 'rls',
\ 'cmd': {server_info->['rls']},
\ 'whitelist': ['rust'],
\ })
autocmd FileType rust call s:configure_lsp()
endif
if executable('docker-langserver')
let s:asyncomplete_blacklist += ['dockerfile']
au User lsp_setup call lsp#register_server({
\ 'name': 'docker-langserver',
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'docker-langserver --stdio']},
\ 'whitelist': ['dockerfile'],
\ })
autocmd FileType Dockerfile call s:configure_lsp()
endif
if executable('cquery')
let s:asyncomplete_blacklist += ['c', 'cpp', 'objc', 'objcpp']
au User lsp_setup call lsp#register_server({
\ 'name': 'cquery',
\ 'cmd': {server_info->['cquery']},
\ 'root_uri': {server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'compile_commands.json'))},
\ 'initialization_options': { 'cacheDirectory': has('win32') ? expand(s:settings['data_dir'] . '/cquery') : '/tmp/cquery' },
\ 'whitelist': ['c', 'cpp', 'objc', 'objcpp'],
\ })
autocmd FileType c call s:configure_lsp()
autocmd FileType cpp call s:configure_lsp()
autocmd FileType objc call s:configure_lsp()
autocmd FileType objcpp call s:configure_lsp()
endif
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#omni#get_source_options({
\ 'name': 'omni',
\ 'whitelist': ['*'],
\ 'blacklist': s:asyncomplete_blacklist,
\ 'completor': function('asyncomplete#sources#omni#completor'),
\ }))
let s:asyncomplete_blacklist += ['vim']
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#necovim#get_source_options({
\ 'name': 'necovim',
\ 'whitelist': ['vim'],
\ 'completor': function('asyncomplete#sources#necovim#completor'),
\ }))
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#necosyntax#get_source_options({
\ 'name': 'necosyntax',
\ 'whitelist': ['*'],
\ 'blacklist': s:asyncomplete_blacklist,
\ 'completor': function('asyncomplete#sources#necosyntax#completor'),
\ 'triggers': {'*': ['.', '::']},
\ }))
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#buffer#get_source_options({
\ 'name': 'buffer',
\ 'whitelist': ['*'],
\ 'blacklist': s:asyncomplete_blacklist,
\ 'completor': function('asyncomplete#sources#buffer#completor'),
\ 'triggers': {'*': ['::', '->', '=>', '.']},
\ }))
augroup END
function! s:configure_lsp() abort
setlocal omnifunc=lsp#complete
nnoremap <buffer> <C-]> :<C-u>LspDefinition<CR>
nnoremap <buffer> gd :<C-u>LspDefinition<CR>
nnoremap <buffer> gD :<C-u>LspReferences<CR>
nnoremap <buffer> gs :<C-u>LspDocumentSymbol<CR>
nnoremap <buffer> gS :<C-u>LspWorkspaceSymbol<CR>
nnoremap <buffer> gQ :<C-u>LspDocumentFormat<CR>
vnoremap <buffer> gQ :LspDocumentRangeFormat<CR>
nnoremap <buffer> K :<C-u>LspHover<CR>
nnoremap <buffer> <F1> :<C-u>LspImplementation<CR>
nnoremap <buffer> <F2> :<C-u>LspRename<CR>
nnoremap <buffer> <leader>ca :LspCodeAction<CR>
xnoremap <buffer> <leader>ca :LspCodeAction<CR>
endfunction
" }}}
" vim-lookup {{{
autocmd FileType vim nnoremap <buffer><silent> <c-]> :call lookup#lookup()<cr>
autocmd FileType vim nnoremap <buffer><silent> <c-t> :call lookup#pop()<cr>
" }}}
" vim-gtfo {{{
if has('win32') | let g:gtfo#terminals = { 'win' : 'cmd /k' } | endif
"}}}
" vim-closetag {{{
" https://github.com/alvan/vim-closetag/issues/1
let g:closetag_filenames = "*.xml,*.html,*.html,*.tsx,*.config"
au FileType xml,html,xhtml,js,typescript let b:delimitMate_matchpairs = "(:),[:],{:}"
" }}}
" nerdtree {{{
nnoremap <silent> <leader>e :NERDTreeFind<CR>
nnoremap <silent> <leader>E :NERDTreeToggle<CR>
" }}}
" ctrlp-commandpalette.vim {{{
nnoremap <leader>p :CtrlPCommandPalette<cr>
let g:ctrlp_commandpalette_autoload_commands = 0
let g:commandPalette = {
\ 'Change filetype': 'Pfiletypes',
\ 'Change Colorscheme': 'Pcolorscheme',
\ 'LSP: goto definition': 'LspDefinition',
\ 'GUI Font picker': 'set guifont=*',
\ 'Current font name': 'set guifont?',
\ 'GitFiles': 'GitFiles',
\ 'Ignorecase: Toggle': 'set ignorecase!',
\ 'Sessions': 'CtrlPSession',
\ }
" }}}
if filereadable(expand('~/.vimrc.local')) | source ~/.vimrc.local | endif
" vim: set sw=2 ts=2 sts=2 et tw=78 foldmarker={{{,}}} foldmethod=marker spell:
# 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
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
# check the local terminfo database and use 'alacritty' if it is
# available, otherwise 'xterm-256color' is used.
#TERM: xterm-256color
window:
# Window dimensions (changes require restart)
#
# Specified in number of columns/lines, not pixels.
# If both are `0`, this setting is ignored.
dimensions:
columns: 80
lines: 24
# Window padding (changes require restart)
#
# Blank space added around the window in pixels. This padding is scaled
# by DPI and the specified value is always added at both opposing sides.
padding:
x: 0
y: 0
# Spread additional padding evenly around the terminal content.
dynamic_padding: false
# Window decorations
#
# Available values:
# - `full`: Window with title bar and title bar buttons
# - `none`: Window without title bar, rounded corners, or drop shadow
# - `transparent`: Window with title bar with transparent background and title
# bar buttons
# - `buttonless`: Window with title bar with transparent background and no
# title bar buttons
# Window decorations
#
# Values for `decorations`:
# - full: Borders and title bar
# - none: Neither borders nor title bar
# - buttonless: Title bar, transparent background and title bar buttons
# - transparent: Title bar, transparent background, but no title bar buttons
decorations: full
# When true, alacritty starts maximized.
start_maximized: false
scrolling:
# Maximum number of lines in the scrollback buffer.
# Specifying '0' will disable scrolling.
history: 10000
# Number of lines the viewport will move for every line scrolled when
# scrollback is enabled (history > 0).
multiplier: 3
# Faux Scrolling
#
# The `faux_multiplier` setting controls the number of lines the terminal
# should scroll when the alternate screen buffer is active. This is used
# to allow mouse scrolling for applications like `man`.
#
# Specifying `0` will disable faux scrolling.
faux_multiplier: 3
# Scroll to the bottom when new text is written to the terminal.
auto_scroll: false
# Spaces per Tab (changes require restart)
#
# This setting defines the width of a tab in cells.
#
# Some applications, like Emacs, rely on knowing about the width of a tab.
# To prevent unexpected behavior in these applications, it's also required to
# change the `it` value in terminfo when altering this setting.
tabspaces: 8
# Font configuration (changes require restart)
font:
# Normal (roman) font face
normal:
family: Fira Code
# The `style` can be specified to pick a specific face.
# style: Regular
# Bold font face
bold:
family: Fira Code
# The `style` can be specified to pick a specific face.
# style: Bold
# Italic font face
italic:
family: Fira Code
# The `style` can be specified to pick a specific face.
# style: Italic
# Point size
size: 14.0
# Offset is the extra space around each character. `offset.y` can be thought of
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
offset:
x: 2
y: 2
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increasing `x` moves the glyph to the right,
# increasing `y` moves the glyph upwards.
glyph_offset:
x: 0
y: 0
# Thin stroke font rendering (OS X only)
#
# Thin strokes are suitable for retina displays, but for non-retina screens
# it is recommended to set `use_thin_strokes` to `false`
#
# macOS >= 10.14.x:
#
# If the font quality on non-retina display looks bad then set
# `use_thin_strokes` to `true` and enable font smoothing by running the
# following command:
# `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO`
#
# This is a global setting and will require a log out or restart to take
# effect.
use_thin_strokes: true
# Display the time it takes to redraw each frame.
render_timer: false
# Keep the log file after quitting Alacritty.
persistent_logging: false
# If `true`, bold text is drawn using the bright color variants.
draw_bold_text_with_bright_colors: true
# Colors (Solarized Dark)
colors:
# Default colors
primary:
background: '0x002b36'
foreground: '0x839496'
# Normal colors
normal:
black: '0x073642'
red: '0xdc322f'
green: '0x859900'
yellow: '0xb58900'
blue: '0x268bd2'
magenta: '0xd33682'
cyan: '0x2aa198'
white: '0xeee8d5'
# Bright colors
bright:
black: '0x002b36'
red: '0xcb4b16'
green: '0x586e75'
yellow: '0x657b83'
blue: '0x839496'
magenta: '0x6c71c4'
cyan: '0x93a1a1'
white: '0xfdf6e3'
# Visual Bell
#
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
# rung, the terminal background will be set to white and transition back to the
# default background color. You can control the rate of this transition by
# setting the `duration` property (represented in milliseconds). You can also
# configure the transition function by setting the `animation` property.
#
# Values for `animation`:
# - Ease
# - EaseOut
# - EaseOutSine
# - EaseOutQuad
# - EaseOutCubic
# - EaseOutQuart
# - EaseOutQuint
# - EaseOutExpo
# - EaseOutCirc
# - Linear
#
# Specifying a `duration` of `0` will disable the visual bell.
visual_bell:
animation: EaseOutExpo
duration: 0
# Background opacity
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
background_opacity: 1.0
# Mouse bindings
#
# Available fields:
# - mouse
# - action
# - mods (optional)
#
# Values for `mouse`:
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# All available `mods` and `action` values are documented in the key binding
# section.
mouse_bindings:
- { mouse: Middle, action: PasteSelection }
mouse:
# Click settings
#
# The `double_click` and `triple_click` settings control the time
# alacritty should wait for accepting multiple clicks as one double
# or triple click.
double_click: { threshold: 300 }
triple_click: { threshold: 300 }
# If this is `true`, the cursor is temporarily hidden when typing.
hide_when_typing: false
url:
# URL launcher
#
# This program is executed when clicking on a text which is recognized as a URL.
# The URL is always added to the command as the last parameter.
launcher: open
# URL modifiers
#
# These are the modifiers that need to be held down for opening URLs when clicking
# on them. The available modifiers are documented in the key binding section.
#modifiers: Control|Shift
selection:
semantic_escape_chars: ",│`|:\"' ()[]{}<>"
# When set to `true`, selected text will be copied to the primary clipboard.
save_to_clipboard: false
cursor:
# Cursor style
#
# Values for 'style':
# - ▇ Block
# - _ Underline
# - | Beam
style: Block
# If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused.
unfocused_hollow: true
# Live config reload (changes require restart)
live_config_reload: true
# Shell
#
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
# Entries in `shell.args` are passed unmodified as arguments to the shell.
#shell:
# program: /bin/bash
# args:
# - --login
# Key bindings
#
# Key bindings are specified as a list of objects. Each binding will specify
# a key and modifiers required to trigger it, terminal modes where the binding
# is applicable, and what should be done when the key binding fires. It can
# either send a byte sequnce to the running application (`chars`), execute
# a predefined action (`action`) or fork and execute a specified command plus
# arguments (`command`).
#
# Example:
# `- { key: V, mods: Command, action: Paste }`
#
# Available fields:
# - key
# - mods (optional)
# - chars | action | command (exactly one required)
# - mode (optional)
#
# Values for `key`:
# - `A` -> `Z`
# - `F1` -> `F12`
# - `Key1` -> `Key0`
#
# A full list with available key codes can be found here:
# https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants
#
# Instead of using the name of the keys, the `key` field also supports using
# the scancode of the desired key. Scancodes have to be specified as a
# decimal number.
# This command will allow you to display the hex scancodes for certain keys:
# `showkey --scancodes`
#
# Values for `mods`:
# - Command
# - Control
# - Shift
# - Alt
#
# Multiple `mods` can be combined using `|` like this: `mods: Control|Shift`.
# Whitespace and capitalization is relevant and must match the example.
#
# Values for `chars`:
# The `chars` field writes the specified string to the terminal. This makes
# it possible to pass escape sequences.
# To find escape codes for bindings like `PageUp` ("\x1b[5~"), you can run
# the command `showkey -a` outside of tmux.
# Note that applications use terminfo to map escape sequences back to
# keys. It is therefore required to update the terminfo when
# changing an escape sequence.
#
# Values for `action`:
# - Paste
# - PasteSelection
# - Copy
# - IncreaseFontSize
# - DecreaseFontSize
# - ResetFontSize
# - ScrollPageUp
# - ScrollPageDown
# - ScrollToTop
# - ScrollToBottom
# - ClearHistory
# - Hide
# - Quit
# - ClearLogNotice
#
# Values for `command`:
# The `command` field must be a map containing a `program` string and
# an `args` array of command line parameter strings.
#
# Example:
# `command: { program: "alacritty", args: ["-e", "vttest"] }`
#
# Values for `mode`:
# - ~AppCursor
# - AppCursor
# - ~AppKeypad
# - AppKeypad
key_bindings:
- { key: V, mods: Command, action: Paste }
- { key: C, mods: Command, action: Copy }
- { key: Paste, action: Paste }
- { key: Copy, action: Copy }
- { key: H, mods: Command, action: Hide }
- { key: Q, mods: Command, action: Quit }
- { key: W, mods: Command, action: Quit }
- { key: Home, chars: "\x1bOH", mode: AppCursor }
- { key: Home, chars: "\x1b[H", mode: ~AppCursor }
- { key: End, chars: "\x1bOF", mode: AppCursor }
- { key: End, chars: "\x1b[F", mode: ~AppCursor }
- { key: Key0, mods: Command, action: ResetFontSize }
- { key: Equals, mods: Command, action: IncreaseFontSize }
- { key: Minus, mods: Command, action: DecreaseFontSize }
- { key: K, mods: Command, action: ClearHistory }
- { key: K, mods: Command, chars: "\x0c" }
- { key: L, mods: Control, action: ClearLogNotice }
- { key: L, mods: Control, chars: "\x0c" }
- { key: PageUp, mods: Shift, chars: "\x1b[5;2~" }
- { key: PageUp, mods: Control, chars: "\x1b[5;5~" }
- { key: PageUp, chars: "\x1b[5~" }
- { key: PageDown, mods: Shift, chars: "\x1b[6;2~" }
- { key: PageDown, mods: Control, chars: "\x1b[6;5~" }
- { key: PageDown, chars: "\x1b[6~" }
- { key: Tab, mods: Shift, chars: "\x1b[Z" }
- { key: Back, chars: "\x7f" }
- { key: Back, mods: Alt, chars: "\x1b\x7f" }
- { key: Insert, chars: "\x1b[2~" }
- { key: Delete, chars: "\x1b[3~" }
- { key: Left, mods: Shift, chars: "\x1b[1;2D" }
- { key: Left, mods: Control, chars: "\x1b[1;5D" }
- { key: Left, mods: Alt, chars: "\x1b[1;3D" }
- { key: Left, chars: "\x1b[D", mode: ~AppCursor }
- { key: Left, chars: "\x1bOD", mode: AppCursor }
- { key: Right, mods: Shift, chars: "\x1b[1;2C" }
- { key: Right, mods: Control, chars: "\x1b[1;5C" }
- { key: Right, mods: Alt, chars: "\x1b[1;3C" }
- { key: Right, chars: "\x1b[C", mode: ~AppCursor }
- { key: Right, chars: "\x1bOC", mode: AppCursor }
- { key: Up, mods: Shift, chars: "\x1b[1;2A" }
- { key: Up, mods: Control, chars: "\x1b[1;5A" }
- { key: Up, mods: Alt, chars: "\x1b[1;3A" }
- { key: Up, chars: "\x1b[A", mode: ~AppCursor }
- { key: Up, chars: "\x1bOA", mode: AppCursor }
- { key: Down, mods: Shift, chars: "\x1b[1;2B" }
- { key: Down, mods: Control, chars: "\x1b[1;5B" }
- { key: Down, mods: Alt, chars: "\x1b[1;3B" }
- { key: Down, chars: "\x1b[B", mode: ~AppCursor }
- { key: Down, chars: "\x1bOB", mode: AppCursor }
- { key: F1, chars: "\x1bOP" }
- { key: F2, chars: "\x1bOQ" }
- { key: F3, chars: "\x1bOR" }
- { key: F4, chars: "\x1bOS" }
- { key: F5, chars: "\x1b[15~" }
- { key: F6, chars: "\x1b[17~" }
- { key: F7, chars: "\x1b[18~" }
- { key: F8, chars: "\x1b[19~" }
- { key: F9, chars: "\x1b[20~" }
- { key: F10, chars: "\x1b[21~" }
- { key: F11, chars: "\x1b[23~" }
- { key: F12, chars: "\x1b[24~" }
- { key: F1, mods: Shift, chars: "\x1b[1;2P" }
- { key: F2, mods: Shift, chars: "\x1b[1;2Q" }
- { key: F3, mods: Shift, chars: "\x1b[1;2R" }
- { key: F4, mods: Shift, chars: "\x1b[1;2S" }
- { key: F5, mods: Shift, chars: "\x1b[15;2~" }
- { key: F6, mods: Shift, chars: "\x1b[17;2~" }
- { key: F7, mods: Shift, chars: "\x1b[18;2~" }
- { key: F8, mods: Shift, chars: "\x1b[19;2~" }
- { key: F9, mods: Shift, chars: "\x1b[20;2~" }
- { key: F10, mods: Shift, chars: "\x1b[21;2~" }
- { key: F11, mods: Shift, chars: "\x1b[23;2~" }
- { key: F12, mods: Shift, chars: "\x1b[24;2~" }
- { key: F1, mods: Control, chars: "\x1b[1;5P" }
- { key: F2, mods: Control, chars: "\x1b[1;5Q" }
- { key: F3, mods: Control, chars: "\x1b[1;5R" }
- { key: F4, mods: Control, chars: "\x1b[1;5S" }
- { key: F5, mods: Control, chars: "\x1b[15;5~" }
- { key: F6, mods: Control, chars: "\x1b[17;5~" }
- { key: F7, mods: Control, chars: "\x1b[18;5~" }
- { key: F8, mods: Control, chars: "\x1b[19;5~" }
- { key: F9, mods: Control, chars: "\x1b[20;5~" }
- { key: F10, mods: Control, chars: "\x1b[21;5~" }
- { key: F11, mods: Control, chars: "\x1b[23;5~" }
- { key: F12, mods: Control, chars: "\x1b[24;5~" }
- { key: F1, mods: Alt, chars: "\x1b[1;6P" }
- { key: F2, mods: Alt, chars: "\x1b[1;6Q" }
- { key: F3, mods: Alt, chars: "\x1b[1;6R" }
- { key: F4, mods: Alt, chars: "\x1b[1;6S" }
- { key: F5, mods: Alt, chars: "\x1b[15;6~" }
- { key: F6, mods: Alt, chars: "\x1b[17;6~" }
- { key: F7, mods: Alt, chars: "\x1b[18;6~" }
- { key: F8, mods: Alt, chars: "\x1b[19;6~" }
- { key: F9, mods: Alt, chars: "\x1b[20;6~" }
- { key: F10, mods: Alt, chars: "\x1b[21;6~" }
- { key: F11, mods: Alt, chars: "\x1b[23;6~" }
- { key: F12, mods: Alt, chars: "\x1b[24;6~" }
- { key: F1, mods: Command, chars: "\x1b[1;3P" }
- { key: F2, mods: Command, chars: "\x1b[1;3Q" }
- { key: F3, mods: Command, chars: "\x1b[1;3R" }
- { key: F4, mods: Command, chars: "\x1b[1;3S" }
- { key: F5, mods: Command, chars: "\x1b[15;3~" }
- { key: F6, mods: Command, chars: "\x1b[17;3~" }
- { key: F7, mods: Command, chars: "\x1b[18;3~" }
- { key: F8, mods: Command, chars: "\x1b[19;3~" }
- { key: F9, mods: Command, chars: "\x1b[20;3~" }
- { key: F10, mods: Command, chars: "\x1b[21;3~" }
- { key: F11, mods: Command, chars: "\x1b[23;3~" }
- { key: F12, mods: Command, chars: "\x1b[24;3~" }
- { key: NumpadEnter, chars: "\n" }
apk update && apk add --no-cache \
build-base \
curl \
git \
tmux \
vim \
rust \
cargo
#!/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
START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/boxstart.ps1
Set-ExplorerOptions -showFileExtensions
Disable-BingSearch
Enable-RemoteDesktop
Enable-MicrosoftUpdate
cinst curl
cinst googlechrome
cinst visualstudiocode
cinst googledrive
cinst python
cinst python2
cinst wget
cinst nuget.commandline
cinst procexp
cinst paint.net
cinst fiddler4
cinst mingw
cinst webpicmd
cinst webpi
cinst cmake
cinst redis-64
cinst imagemagick
cinst cpu-z
cinst kdiff3
cinst dotpeek
cinst gpg4win
cinst nugetpackageexplorer
cinst f.lux
cinst linqpad
cinst sourcecodepro
cinst rabbitmq
cinst ansicon
cinst windbg
cinst sudo
cinst clink
cinst ctags
cinst jq
cinst ack
cinst dependencywalker
cinst postgresql
cinst pgadmin3
cinst zoomit
brew install vim --with-lua
brew install fzf node ripgrep tmux
rmdir /s /q vim80
powershell -NoProfile -ExecutionPolicy Bypass -Command "(new-object System.Net.WebClient).DownloadFile('http://tuxproject.de/projects/vim/complete-x64.7z', 'complete-x64.7z')"
"%ProgramFiles%\7-Zip\7z.exe" x complete-x64.7z -ovim80
del complete-x64.7z
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment