Skip to content

Instantly share code, notes, and snippets.

@Santiago-j-s
Last active November 22, 2019 12:18
Show Gist options
  • Save Santiago-j-s/5abccc64acfcd02f90c3bed9a3f090cb to your computer and use it in GitHub Desktop.
Save Santiago-j-s/5abccc64acfcd02f90c3bed9a3f090cb to your computer and use it in GitHub Desktop.
dotfiles
alias gty='gtypist esp.typ'
alias gst='git status'
alias cat='bat'
alias ls='exa'
alias lc='ls --color="always"'
alias ll='exa --long --header --group'
alias la='exa -a'
alias lg='exa --git --long'
alias l='exa -a --long --header --group'
alias lsnew='exa --sort new -1'
alias tmux='TERM=xterm-256color tmux'
alias vi='nvim'
alias vim='nvim'
# Dark 256 color solarized theme for the color GNU ls utility.
# Used and tested with dircolors (GNU coreutils) 8.5
#
# @author {@link http://sebastian.tramp.name Sebastian Tramp}
# @license http://sam.zoy.org/wtfpl/ Do What The Fuck You Want To Public License (WTFPL)
#
# More Information at
# https://github.com/seebi/dircolors-solarized
# Term Section
TERM Eterm
TERM ansi
TERM color-xterm
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM console
TERM cygwin
TERM dtterm
TERM dvtm
TERM dvtm-256color
TERM eterm-color
TERM fbterm
TERM gnome
TERM gnome-256color
TERM jfbterm
TERM konsole
TERM konsole-256color
TERM kterm
TERM linux
TERM linux-c
TERM mach-color
TERM mlterm
TERM putty
TERM putty-256color
TERM rxvt
TERM rxvt-256color
TERM rxvt-cygwin
TERM rxvt-cygwin-native
TERM rxvt-unicode
TERM rxvt-unicode256
TERM rxvt-unicode-256color
TERM screen
TERM screen-16color
TERM screen-16color-bce
TERM screen-16color-s
TERM screen-16color-bce-s
TERM screen-256color
TERM screen-256color-bce
TERM screen-256color-s
TERM screen-256color-bce-s
TERM screen-256color-italic
TERM screen-bce
TERM screen-w
TERM screen.linux
TERM screen.xterm-256color
TERM st
TERM st-meta
TERM st-256color
TERM st-meta-256color
TERM tmux
TERM tmux-256color
TERM vt100
TERM xterm
TERM xterm-16color
TERM xterm-256color
TERM xterm-256color-italic
TERM xterm-88color
TERM xterm-color
TERM xterm-debian
TERM xterm-termite
## Documentation
#
# standard colors
#
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
#
#
# 256 color support
# see here: http://www.mail-archive.com/bug-coreutils@gnu.org/msg11030.html)
#
# Text 256 color coding:
# 38;5;COLOR_NUMBER
# Background 256 color coding:
# 48;5;COLOR_NUMBER
## Special files
NORMAL 00;38;5;244 # no color code at all
#FILE 00 # regular file: use no color at all
RESET 0 # reset to "normal" color
DIR 00;38;5;33 # directory 01;34
LINK 01;38;5;37 # symbolic link. (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link
FIFO 48;5;230;38;5;136;01 # pipe
SOCK 48;5;230;38;5;136;01 # socket
DOOR 48;5;230;38;5;136;01 # door
BLK 48;5;230;38;5;244;01 # block device driver
CHR 48;5;230;38;5;244;01 # character device driver
ORPHAN 48;5;235;38;5;160 # symlink to nonexistent file, or non-stat'able file
SETUID 48;5;160;38;5;230 # file that is setuid (u+s)
SETGID 48;5;136;38;5;230 # file that is setgid (g+s)
CAPABILITY 30;41 # file with capability
STICKY_OTHER_WRITABLE 48;5;64;38;5;230 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 48;5;235;38;5;33 # dir that is other-writable (o+w) and not sticky
STICKY 48;5;33;38;5;230 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
EXEC 01;38;5;64
## Archives or compressed (violet + bold for compression)
.tar 01;38;5;61
.tgz 01;38;5;61
.arj 01;38;5;61
.taz 01;38;5;61
.lzh 01;38;5;61
.lzma 01;38;5;61
.tlz 01;38;5;61
.txz 01;38;5;61
.zip 01;38;5;61
.z 01;38;5;61
.Z 01;38;5;61
.dz 01;38;5;61
.gz 01;38;5;61
.lz 01;38;5;61
.xz 01;38;5;61
.bz2 01;38;5;61
.bz 01;38;5;61
.tbz 01;38;5;61
.tbz2 01;38;5;61
.tz 01;38;5;61
.deb 01;38;5;61
.rpm 01;38;5;61
.jar 01;38;5;61
.rar 01;38;5;61
.ace 01;38;5;61
.zoo 01;38;5;61
.cpio 01;38;5;61
.7z 01;38;5;61
.rz 01;38;5;61
.apk 01;38;5;61
.gem 01;38;5;61
# Image formats (yellow)
.jpg 00;38;5;136
.JPG 00;38;5;136 #stupid but needed
.jpeg 00;38;5;136
.gif 00;38;5;136
.bmp 00;38;5;136
.pbm 00;38;5;136
.pgm 00;38;5;136
.ppm 00;38;5;136
.tga 00;38;5;136
.xbm 00;38;5;136
.xpm 00;38;5;136
.tif 00;38;5;136
.tiff 00;38;5;136
.png 00;38;5;136
.PNG 00;38;5;136
.svg 00;38;5;136
.svgz 00;38;5;136
.mng 00;38;5;136
.pcx 00;38;5;136
.dl 00;38;5;136
.xcf 00;38;5;136
.xwd 00;38;5;136
.yuv 00;38;5;136
.cgm 00;38;5;136
.emf 00;38;5;136
.eps 00;38;5;136
.CR2 00;38;5;136
.ico 00;38;5;136
.pdf 00;38;5;136
# Files of special interest (base1)
.tex 01;38;5;245
.rdf 01;38;5;245
.owl 01;38;5;245
.n3 01;38;5;245
.ttl 01;38;5;245
.nt 01;38;5;245
.torrent 01;38;5;245
.xml 01;38;5;245
*Makefile 01;38;5;245
*Rakefile 01;38;5;245
*Dockerfile 01;38;5;245
*build.xml 01;38;5;245
*rc 01;38;5;245
*1 01;38;5;245
.nfo 01;38;5;245
*README 01;38;5;245
*README.txt 01;38;5;245
*readme.txt 01;38;5;245
.md 01;38;5;245
*README.markdown 01;38;5;245
.ini 01;38;5;245
.yml 01;38;5;245
.cfg 01;38;5;245
.conf 01;38;5;245
.h 01;38;5;245
.hpp 01;38;5;245
.c 01;38;5;245
.cpp 01;38;5;245
.cxx 01;38;5;245
.cc 01;38;5;245
.objc 01;38;5;245
.sqlite 01;38;5;245
.go 01;38;5;245
.sql 01;38;5;245
.csv 01;38;5;245
# "unimportant" files as logs and backups (base01)
.log 00;38;5;240
.bak 00;38;5;240
.aux 00;38;5;240
.lof 00;38;5;240
.lol 00;38;5;240
.lot 00;38;5;240
.out 00;38;5;240
.toc 00;38;5;240
.bbl 00;38;5;240
.blg 00;38;5;240
*~ 00;38;5;240
*# 00;38;5;240
.part 00;38;5;240
.incomplete 00;38;5;240
.swp 00;38;5;240
.tmp 00;38;5;240
.temp 00;38;5;240
.o 00;38;5;240
.pyc 00;38;5;240
.class 00;38;5;240
.cache 00;38;5;240
# Audio formats (orange)
.aac 00;38;5;166
.au 00;38;5;166
.flac 00;38;5;166
.mid 00;38;5;166
.midi 00;38;5;166
.mka 00;38;5;166
.mp3 00;38;5;166
.mpc 00;38;5;166
.ogg 00;38;5;166
.opus 00;38;5;166
.ra 00;38;5;166
.wav 00;38;5;166
.m4a 00;38;5;166
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
.axa 00;38;5;166
.oga 00;38;5;166
.spx 00;38;5;166
.xspf 00;38;5;166
# Video formats (as audio + bold)
.mov 01;38;5;166
.MOV 01;38;5;166
.mpg 01;38;5;166
.mpeg 01;38;5;166
.m2v 01;38;5;166
.mkv 01;38;5;166
.ogm 01;38;5;166
.mp4 01;38;5;166
.m4v 01;38;5;166
.mp4v 01;38;5;166
.vob 01;38;5;166
.qt 01;38;5;166
.nuv 01;38;5;166
.wmv 01;38;5;166
.asf 01;38;5;166
.rm 01;38;5;166
.rmvb 01;38;5;166
.flc 01;38;5;166
.avi 01;38;5;166
.fli 01;38;5;166
.flv 01;38;5;166
.gl 01;38;5;166
.m2ts 01;38;5;166
.divx 01;38;5;166
.webm 01;38;5;166
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
.axv 01;38;5;166
.anx 01;38;5;166
.ogv 01;38;5;166
.ogx 01;38;5;166
# Other files
.gpg 00;38;5;7
.crt 00;38;5;7
.csr 00;38;5;7
.key 00;38;5;7
" no vi-compatible
set nocompatible
" allow plugins by filetype
filetype plugin on
filetype indent on
" tabs and spaces
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
" tab exceptions
autocmd FileType html setlocal shiftwidth=4 tabstop=4 softtabstop=4
" always show the statusbar
set laststatus=2
" Don't show mode in the status line
set noshowmode
" always show tabs
set showtabline=2
" highlight search
set hlsearch
set incsearch
" clear last highlight
nmap <F3> :noh<CR>
" emulated vim pluggins
" https://github.com/JetBrains/ideavim#emulated-vim-plugins
set surround
set multiple-cursors
set commentary
nmap gh :action QuickJavaDoc<CR>
nmap gr :action FindUsages<CR>
# zsh
set-option -g default-shell /bin/zsh
# color
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
# counting from 1
set -g base-index 1
# remap prefix
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config
bind r source-file ~/.tmux.conf
# switch panes without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# mouse control
set -g mouse on
# don't rename windows automatically
set-option -g allow-rename off
# escape fast (especially for vim)
set -sg escape-time 0
# powerline
run-shell "powerline-daemon -q"
source "/home/santiago/.local/lib/python3.5/site-packages/powerline/bindings/tmux/powerline.conf"
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-fugitive'
Plug 'itchyny/lightline.vim'
Plug 'mhinz/vim-startify'
Plug 'mhinz/vim-signify'
Plug 'tpope/vim-commentary'
Plug 'StanAngeloff/php.vim'
call plug#end()
" no vi-compatible
set nocompatible
" allow plugins by filetype
filetype plugin on
filetype indent on
" tabs and spaces
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
" tab exceptions
autocmd FileType html setlocal shiftwidth=4 tabstop=4 softtabstop=4
" always show the statusbar
set laststatus=2
" Don't show mode in the status line
set noshowmode
" always show tabs
set showtabline=2
" highlight search
set hlsearch
" line numbers
set number
" terminal colors
set t_Co=256
" syntax highlight
syntax on
set background=dark
" signify colors
highlight SignColumn ctermbg=NONE cterm=NONE guibg=NONE gui=NONE
highlight DiffAdd cterm=bold ctermbg=none ctermfg=119
highlight DiffDelete cterm=bold ctermbg=none ctermfg=167
highlight DiffChange cterm=bold ctermbg=none ctermfg=227
" powerline font for gvim
if has('gui_running')
set guifont=Fira\ Mono\ Medium\ for\ Powerline\ Medium\ 11
colorscheme onehalfdark
endif
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# General
#
# Set case-sensitivity for completion, history lookup, etc.
# zstyle ':prezto:*:*' case-sensitive 'yes'
# Color output (auto set to 'no' on dumb terminals).
zstyle ':prezto:*:*' color 'yes'
# Add additional directories to load prezto modules from
# zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto-contrib
# Set the Zsh modules to load (man zshmodules).
# zstyle ':prezto:load' zmodule 'attr' 'stat'
# Set the Zsh functions to load (man zshcontrib).
# zstyle ':prezto:load' zfunction 'zargs' 'zmv'
# Set the Prezto modules to load (browse modules).
# The order matters.
zstyle ':prezto:load' pmodule \
'environment' \
'terminal' \
'editor' \
'history' \
'directory' \
'spectrum' \
'utility' \
'completion' \
'git' \
'syntax-highlighting' \
'history-substring-search' \
'prompt'
#
# Autosuggestions
#
# Set the query found color.
# zstyle ':prezto:module:autosuggestions:color' found ''
#
# Completions
#
# Set the entries to ignore in static */etc/hosts* for host completion.
# zstyle ':prezto:module:completion:*:hosts' etc-host-ignores \
# '0.0.0.0' '127.0.0.1'
#
# Editor
#
# Set the key mapping style to 'emacs' or 'vi'.
zstyle ':prezto:module:editor' key-bindings 'emacs'
# Auto convert .... to ../..
# zstyle ':prezto:module:editor' dot-expansion 'yes'
# Allow the zsh prompt context to be shown.
#zstyle ':prezto:module:editor' ps-context 'yes'
#
# Git
#
# Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'.
# zstyle ':prezto:module:git:status:ignore' submodules 'all'
#
# GNU Utility
#
# Set the command prefix on non-GNU systems.
# zstyle ':prezto:module:gnu-utility' prefix 'g'
#
# History Substring Search
#
# Set the query found color.
# zstyle ':prezto:module:history-substring-search:color' found ''
# Set the query not found color.
# zstyle ':prezto:module:history-substring-search:color' not-found ''
# Set the search globbing flags.
# zstyle ':prezto:module:history-substring-search' globbing-flags ''
#
# macOS
#
# Set the keyword used by `mand` to open man pages in Dash.app
# zstyle ':prezto:module:osx:man' dash-keyword 'manpages'
#
# Pacman
#
# Set the Pacman frontend.
# zstyle ':prezto:module:pacman' frontend 'yaourt'
#
# Prompt
#
# Set the prompt theme to load.
# Setting it to 'random' loads a random theme.
# Auto set to 'off' on dumb terminals.
zstyle ':prezto:module:prompt' theme 'minimal'
# Set the working directory prompt display length.
# By default, it is set to 'short'. Set it to 'long' (without '~' expansion)
# for longer or 'full' (with '~' expansion) for even longer prompt display.
# zstyle ':prezto:module:prompt' pwd-length 'short'
# Set the prompt to display the return code along with an indicator for non-zero
# return codes. This is not supported by all prompts.
# zstyle ':prezto:module:prompt' show-return-val 'yes'
#
# Python
#
# Auto switch the Python virtualenv on directory change.
# zstyle ':prezto:module:python:virtualenv' auto-switch 'yes'
# Automatically initialize virtualenvwrapper if pre-requisites are met.
# zstyle ':prezto:module:python:virtualenv' initialize 'yes'
#
# Ruby
#
# Auto switch the Ruby version on directory change.
# zstyle ':prezto:module:ruby:chruby' auto-switch 'yes'
#
# Screen
#
# Auto start a session when Zsh is launched in a local terminal.
# zstyle ':prezto:module:screen:auto-start' local 'yes'
# Auto start a session when Zsh is launched in a SSH connection.
# zstyle ':prezto:module:screen:auto-start' remote 'yes'
#
# SSH
#
# Set the SSH identities to load into the agent.
# zstyle ':prezto:module:ssh:load' identities 'id_rsa' 'id_rsa2' 'id_github'
#
# Syntax Highlighting
#
# Set syntax highlighters.
# By default, only the main highlighter is enabled.
# zstyle ':prezto:module:syntax-highlighting' highlighters \
# 'main' \
# 'brackets' \
# 'pattern' \
# 'line' \
# 'cursor' \
# 'root'
#
# Set syntax highlighting styles.
# zstyle ':prezto:module:syntax-highlighting' styles \
# 'builtin' 'bg=blue' \
# 'command' 'bg=blue' \
# 'function' 'bg=blue'
#
# Set syntax pattern styles.
# zstyle ':prezto:module:syntax-highlighting' pattern \
# 'rm*-rf*' 'fg=white,bold,bg=red'
#
# Terminal
#
# Auto set the tab and window titles.
# zstyle ':prezto:module:terminal' auto-title 'yes'
# Set the window title format.
# zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s'
# Set the tab title format.
# zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
# Set the terminal multiplexer title format.
# zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
#
# Tmux
#
# Auto start a session when Zsh is launched in a local terminal.
# zstyle ':prezto:module:tmux:auto-start' local 'yes'
# Auto start a session when Zsh is launched in a SSH connection.
# zstyle ':prezto:module:tmux:auto-start' remote 'yes'
# Integrate with iTerm2.
# zstyle ':prezto:module:tmux:iterm' integrate 'yes'
# Set the default session name:
# zstyle ':prezto:module:tmux:session' name 'YOUR DEFAULT SESSION NAME'
#
# Utility
#
# Enabled safe options. This aliases cp, ln, mv and rm so that they prompt
# before deleting or overwriting files. Set to 'no' to disable this safer
# behavior.
zstyle ':prezto:module:utility' safe-ops 'yes'
#
# Executes commands at login pre-zshrc.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# Browser
#
if [[ "$OSTYPE" == darwin* ]]; then
export BROWSER='open'
fi
#
# Editors
#
export EDITOR='nvim'
export VISUAL='nvim'
export PAGER='less'
#
# Language
#
if [[ -z "$LANG" ]]; then
export LANG='en_US.UTF-8'
fi
#
# Paths
#
# Ensure path arrays do not contain duplicates.
typeset -gU cdpath fpath mailpath path
# Set the list of directories that cd searches.
# cdpath=(
# $cdpath
# )
# Set the list of directories that Zsh searches for programs.
path=(
$HOME/.local/bin
$HOME/.poetry/bin
$HOME/.npm-global/bin
$HOME/.gopath/bin
$HOME/.gnat/2018/bin
/usr/gnat/bin
/opt/gps/bin
/usr/local/go/bin
$HOME/.cargo/bin
/usr/local/{bin,sbin}
$path
)
#
# Less
#
# Set the default Less options.
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
# Remove -X and -F (exit if the content fits on one screen) to enable it.
export LESS='-F -g -i -M -R -S -w -X -z-4'
# Set the Less input preprocessor.
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
if (( $#commands[(i)lesspipe(|.sh)] )); then
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
fi
# Customizations
export GOPATH=$HOME/.gopath
#
# Executes commands at the start of an interactive session.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
# Customize to your needs...
# Fix color
#if [[ -e /usr/share/terminfo/x/xterm+256color ]] && [[ "$COLORTERM" == "xfce4-terminal" ]]; then
# export TERM=xterm-256color
#fi
# Aliases
source $HOME/.aliases
# Functions
fpath=(
~/.zfuncs
$fpath
)
autoload -zU weather
if [[ -s "$HOME/.pyenv/bin/pyenv" ]]; then
path=("$HOME/.pyenv/bin" $path)
export PYENV_ROOT=$(pyenv root)
eval "$(pyenv init - --no-rehash zsh)"
fi
if [[ -s "$HOME/.pyenv/plugins/pyenv-virtualenv/bin/pyenv-virtualenv" ]]; then
eval "$(pyenv virtualenv-init - zsh)"
fi
export _git_log_oneline_format='%C(green)%h%C(reset) %s%C(red)%d%C(reset)'
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="/home/santiago/.sdkman"
[[ -s "/home/santiago/.sdkman/bin/sdkman-init.sh" ]] && source "/home/santiago/.sdkman/bin/sdkman-init.sh"
call plug#begin('~/.vim/plugged')
" git
Plug 'tpope/vim-fugitive'
Plug 'mhinz/vim-signify'
" status line
Plug 'itchyny/lightline.vim'
" start screen
Plug 'mhinz/vim-startify'
" easy comments (gcc, gc, gcgc)
Plug 'tpope/vim-commentary'
" surroundings, brackets, etc. (ds, cs, ys).
Plug 'tpope/vim-surround'
Plug 'Townk/vim-autoclose'
" emmet
Plug 'mattn/emmet-vim'
" language support (syntax, indentation only)
Plug 'sheerun/vim-polyglot'
" in search, print actual index and total number of matches
Plug 'vim-scripts/IndexedSearch'
" tags
Plug 'ludovicchabant/vim-gutentags'
Plug 'majutsushi/tagbar'
" fuzzy finder for files
Plug 'ctrlpvim/ctrlp.vim'
" snippets
Plug 'sirver/ultisnips'
" sneak s{char}{char}
Plug 'justinmk/vim-sneak'
" refactoring and completions for php files
Plug 'ncm2/ncm2'
Plug 'ncm2/ncm2-ultisnips'
Plug 'roxma/nvim-yarp'
Plug 'phpactor/phpactor' , {'do': 'composer install', 'for': 'php'}
Plug 'phpactor/ncm2-phpactor'
" search
Plug 'mileszs/ack.vim'
call plug#end()
" fix weird symbols
" https://github.com/neovim/neovim/wiki/FAQ#nvim-shows-weird-symbols-2-q-when-changing-modes
:set guicursor=
:autocmd OptionSet guicursor noautocmd set guicursor=
" tabs and spaces
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
" show line numbers
set number
" mouse support
set mouse=a
" jump to end of line while in insert mode
inoremap <C-e> <C-o>A
" tab mappings
map tt :tabnew
" clear last highlight
map <F3> :noh<CR>
" toggle tagbar
map <F4> :TagbarToggle<CR>
" shows start screen
map <F2> :Startify<CR>
" remove ugly vertical lines on window division
set fillchars+=vert:\
" fix color for dark backgrounds
" set background=dark
" support for truecolor (24-bit)
if exists('+termguicolors')
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
" colorscheme
colorscheme night-owl
" fix problems with uncommon shells (fish, xonsh) and plugins running commands
" (neomake, ...)
set shell=/bin/bash
" signify colors
highlight SignColumn ctermbg=233 cterm=NONE guibg=#011627 gui=NONE
highlight DiffAdd cterm=bold ctermbg=233 guibg=#011627 guifg=#addb67
highlight DiffDelete cterm=bold ctermbg=233 guibg=#011627 guifg=#ef5350 ctermfg=167
highlight DiffChange cterm=bold ctermbg=233 guibg=#011627 guifg=#a2bffc ctermfg=227
" ncm2
autocmd BufEnter * call ncm2#enable_for_buffer()
set completeopt=noinsert,menuone,noselect
" supress the annoying 'match x of y', 'The only match' and 'Pattern not
" found' messages
set shortmess+=c
" CTRL-C doesn't trigger the InsertLeave autocmd . map to <ESC> instead.
inoremap <c-c> <ESC>
" When the <Enter> key is pressed while the popup menu is visible, it only
" hides the menu. Use this mapping to close the menu and also start a new
" line.
inoremap <expr> <CR> (pumvisible() ? "\<c-y>\<cr>" : "\<CR>")
" Use <TAB> to select the popup menu:
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" phpactor mappings
" Include use statement
nmap <Leader>u :call phpactor#UseAdd()<CR>
" Invoke the context menu
nmap <Leader>mm :call phpactor#ContextMenu()<CR>
" Invoke the navigation menu
nmap <Leader>nn :call phpactor#Navigate()<CR>
" Goto definition of class or class member under the cursor
nmap <Leader>o :call phpactor#GotoDefinition()<CR>
" Transform the classes in the current file
nmap <Leader>tt :call phpactor#Transform()<CR>
" Generate a new class (replacing the current file)
nmap <Leader>cc :call phpactor#ClassNew()<CR>
" Extract expression (normal mode)
nmap <silent><Leader>ee :call phpactor#ExtractExpression(v:false)<CR>
" Extract expression from selection
vmap <silent><Leader>ee :<C-U>call phpactor#ExtractExpression(v:true)<CR>
" Extract method from selection
vmap <silent><Leader>em :<C-U>call phpactor#ExtractMethod()<CR>
" enter key triggers snippet expansion
inoremap <silent> <expr> <CR> ncm2_ultisnips#expand_or("\<CR>", 'n')
" c-j c-k for moving in snippet
let g:UltiSnipsJumpForwardTrigger = "<c-j>"
let g:UltiSnipsJumpBackwardTrigger = "<c-k>"
let g:UltiSnipsRemoveSelectModeMappings = 0
" search with silver searcher if available
if executable('ag')
let g:ackprg = 'ag --vimgrep'
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment