├── .config ├── nvim │ ├── clean.sh │ ├── .gitignore │ ├── spell │ │ ├── en.utf-8.spl │ │ ├── en.utf-8.sug │ │ ├── en.utf-8.add.spl │ │ └── en.utf-8.add │ ├── setup.sh │ ├── snippets │ │ └── gophercon2016.snippets │ ├── tmux.conf │ ├── plugins.vim │ └── init.vim └── fish │ ├── functions │ ├── fish_prompt.fish │ └── tag.fish │ └── config.fish └── .fonts ├── iosevka-term-bold.ttf ├── iosevka-term-thin.ttf ├── iosevka-term-heavy.ttf ├── iosevka-term-italic.ttf ├── iosevka-term-light.ttf ├── iosevka-term-medium.ttf ├── iosevka-term-oblique.ttf ├── iosevka-term-regular.ttf ├── iosevka-term-bolditalic.ttf ├── iosevka-term-boldoblique.ttf ├── iosevka-term-extralight.ttf ├── iosevka-term-heavyitalic.ttf ├── iosevka-term-lightitalic.ttf ├── iosevka-term-thinitalic.ttf ├── iosevka-term-thinoblique.ttf ├── iosevka-term-heavyoblique.ttf ├── iosevka-term-lightoblique.ttf ├── iosevka-term-mediumitalic.ttf ├── iosevka-term-mediumoblique.ttf ├── iosevka-term-extralightitalic.ttf └── iosevka-term-extralightoblique.ttf /.config/nvim/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf autoload plugged 4 | -------------------------------------------------------------------------------- /.config/fish/functions/fish_prompt.fish: -------------------------------------------------------------------------------- 1 | /home/raphael/.local/share/omf/themes/pure/fish_prompt.fish -------------------------------------------------------------------------------- /.config/nvim/.gitignore: -------------------------------------------------------------------------------- 1 | .net* 2 | *.swp 3 | 4 | tags 5 | plugged 6 | autoload 7 | .*-rplugin~ 8 | -------------------------------------------------------------------------------- /.fonts/iosevka-term-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-bold.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-thin.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-heavy.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-heavy.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-italic.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-light.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-medium.ttf -------------------------------------------------------------------------------- /.config/nvim/spell/en.utf-8.spl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.config/nvim/spell/en.utf-8.spl -------------------------------------------------------------------------------- /.config/nvim/spell/en.utf-8.sug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.config/nvim/spell/en.utf-8.sug -------------------------------------------------------------------------------- /.fonts/iosevka-term-oblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-oblique.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-regular.ttf -------------------------------------------------------------------------------- /.config/nvim/spell/en.utf-8.add.spl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.config/nvim/spell/en.utf-8.add.spl -------------------------------------------------------------------------------- /.fonts/iosevka-term-bolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-bolditalic.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-boldoblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-boldoblique.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-extralight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-extralight.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-heavyitalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-heavyitalic.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-lightitalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-lightitalic.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-thinitalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-thinitalic.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-thinoblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-thinoblique.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-heavyoblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-heavyoblique.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-lightoblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-lightoblique.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-mediumitalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-mediumitalic.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-mediumoblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-mediumoblique.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-extralightitalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-extralightitalic.ttf -------------------------------------------------------------------------------- /.fonts/iosevka-term-extralightoblique.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphael/presentation-dotfiles/master/.fonts/iosevka-term-extralightoblique.ttf -------------------------------------------------------------------------------- /.config/fish/functions/tag.fish: -------------------------------------------------------------------------------- 1 | function tag 2 | set -q TAG_ALIAS_FILE; or set -l TAG_ALIAS_FILE /tmp/tag_aliases 3 | command tag $argv; and source $TAG_ALIAS_FILE ^/dev/null 4 | alias ag tag 5 | end 6 | 7 | -------------------------------------------------------------------------------- /.config/nvim/spell/en.utf-8.add: -------------------------------------------------------------------------------- 1 | goagen 2 | API 3 | DSL 4 | goa 5 | MediaType 6 | goa 7 | Microservice 8 | Microservice 9 | golang 10 | microservices 11 | RightScale 12 | raphael 13 | rgsimon 14 | microservice 15 | APIs 16 | middlewares 17 | goa 18 | gopheracademy 19 | localhost 20 | metadata 21 | goa 22 | UX 23 | dev 24 | UIs 25 | Ketelsen 26 | -------------------------------------------------------------------------------- /.config/fish/config.fish: -------------------------------------------------------------------------------- 1 | set fish_greeting "" 2 | 3 | alias vi=nvim 4 | alias vim=nvim 5 | alias pbcopy='xclip -selection clipboard' 6 | alias pbpaste='xclip -selection clipboard -o' 7 | alias gg=gitg 8 | 9 | set -gx NVIM_TUI_ENABLE_TRUE_COLOR 1 10 | set -gx GOPATH /home/demo/go 11 | set -gx PATH $PATH $GOPATH/bin 12 | 13 | function cdg 14 | cd (gcd $argv) 15 | end 16 | -------------------------------------------------------------------------------- /.config/nvim/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ${XDG_CONFIG_HOME:=$HOME/.config} 4 | echo "Backing up existing neovim config" 5 | today=`date +%Y%m%d` 6 | nvim="${XDG_CONFIG_HOME}/nvim" 7 | [ -e $nvim ] && [ ! -L $nvim ] && mv $nvim $nvim.$today 8 | 9 | echo "Creating symlink" 10 | ln -s $PWD $nvim 11 | 12 | echo "Installing plugins" 13 | curl -fLo ${nvim}/autoload/plug.vim --create-dirs \ 14 | https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 15 | 16 | nvim -u init.vim +PlugInstall +qall 17 | nvim -u init.vim +UpdateRemotePlugins +qall 18 | -------------------------------------------------------------------------------- /.config/nvim/snippets/gophercon2016.snippets: -------------------------------------------------------------------------------- 1 | snippet pac 2 | package design 3 | 4 | import . "github.com/goadesign/goa/design" 5 | import . "github.com/goadesign/goa/design/apidsl" 6 | 7 | 8 | 9 | snippet API 10 | API("cellar", func() { 11 | Description("The wine review service") 12 | Host("localhost:8080") 13 | }) 14 | 15 | 16 | snippet Typ 17 | Type("BottlePayload", func() { 18 | Description("BottlePayload is the type used to create bottles") 19 | 20 | 21 | 22 | snippet Att 23 | Attribute("name", String, "Name of bottle", func() { 24 | MinLength(1) 25 | }) 26 | 27 | 28 | snippet Attr 29 | Attribute("vintage", Integer, "Vintage of bottle", func() { 30 | Minimum(1900) 31 | }) 32 | Attribute("rating", Integer, "Rating of bottle", func() { 33 | Minimum(1) 34 | Maximum(5) 35 | }) 36 | Required("name", "vintage", "rating") 37 | }) 38 | 39 | 40 | 41 | snippet Med 42 | MediaType("application/vnd.gophercon.goa.bottle", func() { 43 | TypeName("bottle") 44 | Reference(BottlePayload) 45 | 46 | 47 | 48 | snippet Attri 49 | Attributes(func() { 50 | Attribute("ID", Integer, "Unique bottle ID") 51 | Attribute("name") 52 | Attribute("vintage") 53 | Attribute("rating") 54 | Required("ID", "name", "vintage", "rating") 55 | }) 56 | 57 | 58 | 59 | snippet Vie 60 | View("default", func() { 61 | Attribute("ID") 62 | Attribute("name") 63 | Attribute("vintage") 64 | Attribute("rating") 65 | }) 66 | }) 67 | 68 | 69 | 70 | snippet Res 71 | Resource("bottle", func() { 72 | Description("A wine bottle") 73 | BasePath("/bottles") 74 | 75 | 76 | 77 | snippet Act 78 | Action("create", func() { 79 | Description("creates a bottle") 80 | Routing(POST("/")) 81 | Payload(BottlePayload) 82 | Response(Created) 83 | }) 84 | 85 | 86 | 87 | snippet Acti 88 | Action("show", func() { 89 | Description("shows a bottle") 90 | Routing(GET("/:id")) 91 | Params(func() { 92 | Param("id", Integer) 93 | }) 94 | Response(OK, BottleMedia) 95 | }) 96 | }) 97 | 98 | 99 | snippet swa 100 | swagger", func() { 101 | Description("The API Swagger specification") 102 | 103 | Files("/swagger.json", "swagger/swagger.json") 104 | Files("/swagger-ui/*filepath", "swagger-ui/") 105 | }) 106 | 107 | snippet cs 108 | cs := NewSwaggerController(service) 109 | app.MountSwaggerController(service, cs) 110 | -------------------------------------------------------------------------------- /.config/nvim/tmux.conf: -------------------------------------------------------------------------------- 1 | # 0 is too far from ` ;) 2 | set -g base-index 1 3 | 4 | # Make it pretty 5 | set -g default-terminal "screen-256color" 6 | 7 | # Automatically set window title 8 | set-window-option -g automatic-rename on 9 | set-option -g set-titles on 10 | set-option -ga terminal-overrides ",xterm-256color:Tc" 11 | 12 | setw -g mode-keys vi 13 | # emacs key bindings in tmux command prompt (prefix + :) are better than 14 | # vi keys, even for vim users 15 | #set -g status-keys emacs 16 | 17 | # remap prefix from 'C-b' to 'M-a' 18 | unbind C-b 19 | set-option -g prefix M-a 20 | bind-key M-a send-prefix 21 | 22 | # address vim mode switching delay (http://superuser.com/a/252717/65504) 23 | set -s escape-time 0 24 | 25 | # Update status every second 26 | set -g status-interval 1 27 | 28 | # increase scrollback buffer size 29 | set -g history-limit 50000 30 | 31 | # focus events enabled for terminals that support them 32 | set -g focus-events on 33 | 34 | # super useful when using "grouped sessions" and multi-monitor setup 35 | setw -g aggressive-resize on 36 | 37 | # easier and faster switching between next/prev window 38 | bind -n M-left previous-window 39 | bind -n M-right next-window 40 | 41 | bind-key v split-window -h 42 | bind-key s split-window -v 43 | 44 | bind-key -n M-S-Left swap-window -t -1 45 | bind-key -n M-S-Right swap-window -t +1 46 | 47 | # switch panes using Ctrl-arrow without prefix 48 | bind -n C-Left select-pane -L 49 | bind -n C-Right select-pane -R 50 | bind -n C-Up select-pane -U 51 | bind -n C-Down select-pane -D 52 | bind -n M-h select-pane -L 53 | bind -n M-l select-pane -R 54 | bind -n M-k select-pane -U 55 | bind -n M-j select-pane -D 56 | 57 | # reload config file (change file location to your the tmux.conf you want to use) 58 | bind R source-file ~/.tmux.conf 59 | 60 | # Mouse mode 61 | set -g mouse on 62 | 63 | # Plugins 64 | set -g @plugin 'tmux-plugins/tmux-prefix-highlight' 65 | set -g @prefix_highlight_show_copy_mode 'on' 66 | set -g @plugin 'tmux-plugins/tmux-copycat' 67 | set -g @plugin 'tmux-plugins/tmux-cpu' 68 | set -g @plugin 'tmux-plugins/tmux-open' 69 | set -g @plugin 'tmux-plugins/tmux-yank' 70 | 71 | set -g @prefix_highlight_fg 'black' 72 | set -g @prefix_highlight_bg 'yellow' 73 | 74 | # This tmux statusbar config was created based on gruvbox colorscheme 75 | 76 | set -g status "on" 77 | set -g status-justify "left" 78 | set -g status-left-length "100" 79 | set -g status-right-length "100" 80 | set -g status-right-attr "none" 81 | set -g status-attr "none" 82 | set -g status-left-attr "none" 83 | set -g pane-active-border-fg "colour248" 84 | set -g pane-border-fg "colour238" 85 | set -g status-bg "colour237" 86 | set -g message-fg "colour237" 87 | set -g message-bg "colour248" 88 | set -g message-command-fg "colour237" 89 | set -g message-command-bg "colour248" 90 | setw -g window-status-fg "colour237" 91 | setw -g window-status-bg "colour142" 92 | setw -g window-status-attr "none" 93 | setw -g window-status-activity-bg "colour237" 94 | setw -g window-status-activity-attr "none" 95 | setw -g window-status-activity-fg "colour248" 96 | setw -g window-status-separator "" 97 | 98 | set -g status-left "#[fg=colour248,bg=colour241] #S #[fg=colour241,bg=colour237,nobold,nounderscore,noitalics]" 99 | set -g status-right "#[fg=colour239,bg=colour237,nobold,nounderscore,noitalics]#[fg=colour246,bg=colour239] %m/%d  %H:%M #[fg=colour248,bg=colour239,nobold,nounderscore,noitalics]#[fg=colour237,bg=colour248] #{cpu_percentage} " 100 | setw -g window-status-format "#[fg=colour237,bg=colour239,noitalics]#[fg=colour223,bg=colour239] #I #[fg=colour223,bg=colour239] #W #[fg=colour239,bg=colour237,noitalics]" 101 | setw -g window-status-current-format "#[fg=colour239,bg=colour248,:nobold,nounderscore,noitalics]#[fg=colour239,bg=colour142] #I #[fg=colour239,bg=colour142,bold] #W #[fg=colour142,bg=colour237,nobold,nounderscore,noitalics]" 102 | 103 | 104 | 105 | # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) 106 | run '~/.tmux/plugins/tpm/tpm' 107 | 108 | -------------------------------------------------------------------------------- /.config/nvim/plugins.vim: -------------------------------------------------------------------------------- 1 | call plug#begin('~/.config/nvim/plugged') 2 | 3 | " the silver searcher 4 | Plug 'rking/ag.vim' 5 | 6 | " Status line 7 | "let g:airline#extensions#tabline#left_sep = ' ' 8 | "let g:airline#extensions#tabline#left_alt_sep = '|' 9 | "let g:airline#extensions#tabline#left_sep = ' ' 10 | "let g:airline#extensions#tabline#left_alt_sep = '|' 11 | let g:airline_powerline_fonts=1 12 | Plug 'vim-airline/vim-airline' 13 | 14 | " Theme 15 | let g:gruvbox_italic=1 16 | "Plug 'morhetz/gruvbox' 17 | Plug 'fxn/vim-monochrome' 18 | " 19 | Plug 'jonathanfilip/vim-lucius' 20 | 21 | " General 22 | Plug 'scrooloose/nerdtree' 23 | let NERDTreeShowBookmarks=0 24 | let NERDTreeShowHidden=0 25 | let NERDTreeChDirMode=2 " Keep cwd in sync with tree root 26 | let NERDTreeQuitOnOpen=0 " Do not close tree after opening a file 27 | let g:nerdtree_tabs_open_on_gui_startup=0 28 | map d :execute 'NERDTreeToggle ' . getcwd() 29 | map f :execute 'NERDTreeFind' 30 | 31 | Plug 'tpope/vim-surround' 32 | 33 | Plug 'dkprice/vim-easygrep' 34 | 35 | Plug 'kien/ctrlp.vim' 36 | let g:ctrlp_working_path_mode='ra' " Use parent directory with '.git' file as root (r) or current directory if none (a) 37 | let g:ctrlp_custom_ignore="/(.log$\|public\/|\.(git|hg|svn)|ui\/)" 38 | 39 | Plug 'godlygeek/csapprox' 40 | Plug 'jistr/vim-nerdtree-tabs' 41 | 42 | Plug 'mbbill/undotree' 43 | nnoremap u :UndotreeToggle 44 | let g:undotree_SetFocusWhenToggle=1 45 | 46 | Plug 'tpope/vim-repeat' 47 | 48 | " Syntax checking 49 | Plug 'scrooloose/syntastic' 50 | 51 | " Commenting 52 | Plug 'scrooloose/nerdcommenter' 53 | 54 | " deoplete 55 | "Plug 'Shougo/deoplete.nvim' 56 | "Plug 'zchee/deoplete-go', { 'do': 'make'} 57 | 58 | " Complete with tab 59 | "inoremap pumvisible() ? "\" : "\" 60 | 61 | " neocomplete like 62 | " set completeopt+=noinsert 63 | " deoplete.nvim recommend 64 | "set completeopt+=noselect 65 | 66 | " Path to python interpreter for neovim 67 | let g:python3_host_prog = '/usr/bin/python' 68 | " Skip the check of neovim module 69 | " let g:python3_host_skip_check = 1 70 | 71 | " Run deoplete.nvim automatically 72 | "let g:deoplete#enable_at_startup = 1 73 | " deoplete-go settings 74 | "let g:deoplete#sources#go#gocode_binary = $GOPATH.'/bin/gocode' 75 | "let g:deoplete#sources#go#sort_class = ['package', 'func', 'type', 'var', 'const'] 76 | 77 | " YCM 78 | "Plug 'Valloric/YouCompleteMe' 79 | 80 | " Git 81 | Plug 'tpope/vim-fugitive' 82 | nnoremap gs :Gstatus 83 | nnoremap gd :Gdiff 84 | nnoremap gc :Gcommit 85 | nnoremap gb :Gblame 86 | nnoremap gl :Glog 87 | nnoremap gp :Git push 88 | 89 | Plug 'majutsushi/tagbar' 90 | " GO support (https://github.com/jstemmer/gotags) 91 | 92 | " Git gutter 93 | "Plug 'airblade/vim-gitgutter' 94 | 95 | " TMUX 96 | "Plug 'edkolev/tmuxline.vim' 97 | 98 | " Javascript 99 | "Plug 'leafgarland/typescript-vim' 100 | "Plug 'leshill/vim-json' 101 | "Plug 'groenewege/vim-less' 102 | "Plug 'pangloss/vim-javascript' 103 | " 104 | " Ruby 105 | " let g:ruby_path = system('echo $HOME/.rbenv/shims') 106 | " Plug 'vim-ruby/vim-ruby' 107 | " autocmd FileType ruby set omnifunc=rubycomplete#Complete 108 | " autocmd FileType ruby let g:rubycomplete_buffer_loading=1 109 | " autocmd FileType ruby let g:rubycomplete_classes_in_global=1 110 | 111 | " rbenv 112 | "Plug 'tpope/vim-rbenv' 113 | 114 | " tmux 115 | "Plug 'tmux-plugins/vim-tmux' 116 | 117 | " bbye 118 | Plug 'gwww/vim-bbye' 119 | nnoremap q :Bdelete 120 | 121 | " impaired 122 | "nnoremap [oh :call gruvbox#hls_show() 123 | "nnoremap ]oh :call gruvbox#hls_hide() 124 | "nnoremap coh :call gruvbox#hls_toggle() 125 | 126 | "nnoremap * :let @/ = "":call gruvbox#hls_show()* 127 | "nnoremap / :let @/ = "":call gruvbox#hls_show()/ 128 | "nnoremap ? :let @/ = "":call gruvbox#hls_show()? 129 | Plug 'tpope/vim-unimpaired' 130 | 131 | " GO - golang 132 | Plug 'fatih/vim-go' 133 | let g:go_fmt_command = "goimports" 134 | let g:go_fmt_autosave = 1 135 | let g:go_fmt_fail_silently = 0 136 | let g:go_highlight_functions = 1 137 | let g:go_highlight_methods = 1 138 | let g:go_highlight_structs = 1 139 | let g:go_highlight_interfaces = 1 140 | let g:go_highlight_operators = 1 141 | let g:go_highlight_build_constraints = 1 142 | let g:syntastic_always_populate_loc_list = 1 143 | let g:syntastic_check_on_open = 1 144 | let g:syntastic_check_on_wq = 0 145 | 146 | let g:go_metalinter_enabled = ['vet', 'errcheck'] 147 | let g:syntastic_go_checkers = ['govet', 'errcheck'] 148 | "let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] } 149 | let g:go_list_type = "quickfix" 150 | 151 | " Present 152 | Plug 'raphael/vim-present-simple' 153 | 154 | " FISH'go', 155 | Plug 'dag/vim-fish' 156 | 157 | " Use tabs in GO 158 | autocmd Filetype go set softtabstop=8 159 | autocmd Filetype go set shiftwidth=8 160 | autocmd Filetype go set tabstop=8 161 | autocmd Filetype go set noexpandtab 162 | autocmd Filetype go set nolist " Do not hightlight tabs in go or other things in go, gofmt will clean it all up anyway 163 | au FileType go nmap gs (go-implements) 164 | au FileType go nmap gi (go-info) 165 | au FileType go nmap gd (go-doc) 166 | au FileType go nmap gv (go-doc-vertical) 167 | au FileType go nmap gr (go-referrers) 168 | au FileType go nmap gb (go-build) 169 | au FileType go nmap gt (go-test) 170 | au FileType go nmap gc (go-coverage) 171 | : au FileType go nmap ds (go-def-split) 172 | : au FileType go nmap dv (go-def-vertical) 173 | : au FileType go nmap dt (go-def-tab) 174 | au FileType go nmap e (go-rename) 175 | 176 | " Misc 177 | Plug 'tpope/vim-markdown' 178 | Plug 'mhinz/vim-startify' 179 | 180 | Plug 'MarcWeber/vim-addon-mw-utils' 181 | Plug 'tomtom/tlib_vim' 182 | 183 | Plug 'garbas/vim-snipmate' " snippets 184 | " Complete snippet with C-J 185 | imap snipMateNextOrTrigger 186 | "imap pumvisible() ? 'asnipMateNextOrTrigger' : 'snipMateNextOrTrigger' 187 | "imap 'snipMateNextOrTrigger' 188 | 189 | call plug#end() 190 | -------------------------------------------------------------------------------- /.config/nvim/init.vim: -------------------------------------------------------------------------------- 1 | " Use Vim settings, rather then Vi settings (much better!). 2 | " This must be first, because it changes other options as a side effect. 3 | set nocompatible 4 | 5 | " DEMO stuff 6 | autocmd VimEnter * SnipMateLoadScope gophercon2016 7 | 8 | " So mapping in plugins are set correctly 9 | let mapleader="," 10 | 11 | " Use system clipboard 12 | set clipboard+=unnamedplus 13 | 14 | " Plugins 15 | source ~/.config/nvim/plugins.vim 16 | 17 | " Appearance 18 | set background=light 19 | "colorscheme gruvbox 20 | colorscheme lucius 21 | LuciusWhiteHighContrast 22 | set guioptions-=T " turns off toolbar 23 | set vb " turns off visual bell 24 | set noerrorbells " don't make noise 25 | 26 | " Prevent slow scrolling of long lines 27 | set synmaxcol=400 28 | 29 | " Switch syntax highlighting on, when the terminal has colors 30 | " Also switch on highlighting the last used search pattern. 31 | if &t_Co > 2 || has("gui_running") 32 | syntax on 33 | set hlsearch 34 | endif 35 | 36 | " TMUX integration 37 | "autocmd BufEnter * call system("tmux rename-window " . expand("%:t")) 38 | "autocmd VimLeave * call system("tmux setw automatic-rename") 39 | "autocmd BufEnter * let &titlestring = ' ' . expand("%:t") 40 | "set title 41 | 42 | " Editor behavior 43 | set linespace=0 44 | set autoread 45 | set smartindent 46 | set backspace=indent,eol,start " allow backspacing over everything in insert mode 47 | set history=1000 " keep 1000 lines of command line history 48 | set ruler " show the cursor position all the time 49 | set showcmd " display incomplete commands 50 | set wildmenu " Show list instead of just completing 51 | set wildmode=list:longest,full " Command completion, list matches, then longest common part, then all. 52 | set whichwrap=b,s,h,l,<,>,[,] " Backspace and cursor keys wrap too 53 | set scrolljump=5 " Lines to scroll when cursor leaves screen 54 | set scrolloff=3 " Minimum lines to keep above and below cursor 55 | set shortmess+=filmnrxoOtT " Abbrev. of messages (avoids 'hit enter') 56 | set hidden " Allow buffer switching without saving 57 | if has('persistent_undo') 58 | set undofile " Persistent undo is nice ... 59 | set undolevels=1000 " Maximum number of changes that can be undone 60 | set undoreload=10000 " Maximum number lines to save for undo on a buffer reload 61 | set undodir=~/.vim/undo// 62 | endif 63 | set showmode " Display the current mode 64 | set cursorline " Highlight current line 65 | set list 66 | set listchars=tab:,.,trail:.,extends:#,nbsp:. " Highlight problematic whitespace 67 | set mouse=a " Automatically enable mouse usage 68 | set mousehide " Hide the mouse cursor while typing 69 | 70 | " Show vertical bar after 100 characters 71 | set colorcolumn=100 72 | 73 | " No backup and no swap 74 | set nobackup 75 | set noswapfile 76 | 77 | " Formatting 78 | set nowrap " Do not wrap long lines 79 | set softtabstop=4 80 | set shiftwidth=4 81 | set tabstop=4 82 | set autoindent 83 | set expandtab " Use spaces instead of tabs 84 | set pastetoggle= " pastetoggle (sane indentation on pastes) 85 | set nofoldenable 86 | 87 | " Search 88 | set incsearch " do incremental searching 89 | set smartcase " Case sensitive when uc present 90 | 91 | " Files to be ignored 92 | set wildignore+=*/tmp/*,*.so,*.swp,*.zip,.idea/*,.idea,*/.idea,*/.idea/* 93 | 94 | " Enable file type detection. 95 | " Use the default filetype settings, so that mail gets 'tw' set to 72, 96 | " 'cindent' is on in C files, etc. 97 | " Also load indent files, to automatically do language-dependent indenting. 98 | filetype plugin indent on 99 | 100 | " Do not replace tabs with spaces for languages that care 101 | "autocmd FileType javascript set dictionary+=$HOME/.vim/dict/node.dict 102 | 103 | " Remove trailing spaces 104 | "autocmd FileType c,cpp,java,php,javascript,python,twig,xml,yml,ruby autocmd BufWritePre call StripTrailingWhitespace() 105 | 106 | " Custom extensions 107 | "autocmd BufNewFile,BufRead *.html.twig set filetype=html.twig 108 | "autocmd BufNewFile,BufRead *.jst set filetype=html 109 | 110 | " Settings for raw text editing 111 | autocmd BufRead *\.txt setlocal formatoptions=l 112 | autocmd BufRead *\.txt setlocal lbr 113 | autocmd BufRead *\.txt map j gj 114 | autocmd BufRead *\.txt map k gk 115 | autocmd BufRead *\.txt setlocal spell spelllang=en_us 116 | 117 | " Auto-completion 118 | set completeopt-=preview " Remove annoying scratch window on completion 119 | autocmd FileType python set omnifunc=pythoncomplete#Complete 120 | autocmd FileType css set omnifunc=csscomplete#CompleteCSS 121 | autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags 122 | autocmd FileType php set omnifunc=phpcomplete#CompletePHP 123 | autocmd FileType c set omnifunc=ccomplete#Complete 124 | autocmd FileType html,markdown,xml setlocal omnifunc=htmlcomplete#CompleteTags 125 | 126 | " Switch between absolute and relative numbering on focus and insert 127 | "set number relativenumber 128 | 129 | " autocmd FocusGained * set number relativenumber 130 | " autocmd WinEnter * set number relativenumber 131 | " autocmd InsertLeave * set number relativenumber 132 | " autocmd BufNewFile * set number relativenumber 133 | " autocmd BufReadPost * set number relativenumber 134 | " 135 | " autocmd FocusLost * set number norelativenumber 136 | " autocmd InsertEnter * set number norelativenumber 137 | " autocmd WinLeave * set number norelativenumber 138 | 139 | " Make ESC work faster 140 | set ttimeoutlen=10 141 | autocmd InsertEnter * set timeoutlen=0 142 | autocmd InsertLeave * set timeoutlen=1000 143 | 144 | set tw=100 145 | " For all text files set 'textwidth' to 78 characters. 146 | autocmd FileType text setlocal textwidth=78 147 | 148 | " When editing a file, always jump to the last known cursor position. 149 | " Don't do it when the position is invalid or when inside an event handler 150 | " (happens when dropping a file on gvim). 151 | autocmd BufReadPost * 152 | \ if line("'\"") > 0 && line("'\"") <= line("$") | 153 | \ exe "normal g`\"" | 154 | \ endif 155 | 156 | autocmd BufRead *.mkd set ai formatoptions=tcroqn2 comments=n:> 157 | 158 | " Bundle filetype 159 | autocmd BufNewFile,BufReadPost *.bundle set filetype=vim 160 | 161 | 162 | " Key Mappings 163 | map Q gq " Don't use Ex mode, use Q for formatting 164 | map t :CtrlP 165 | map b :CtrlPBuffer 166 | map l :TagbarToggle 167 | nmap / :nohlsearch 168 | 169 | " Easier moving in tabs and windows 170 | map j_ 171 | map k_ 172 | map l_ 173 | map h_ 174 | 175 | " Move across tabs 176 | map gT 177 | map gt 178 | 179 | " Save with CTRL+s / CTRL+SHIFT+s 180 | map :wa 181 | 182 | 183 | " Yank from the cursor to the end of the line, to be consistent with C and D. 184 | nnoremap Y y$ 185 | 186 | " F4 to copy current filename into clipboard 187 | noremap :let @+=expand("%:p") 188 | 189 | " Map ff to display all lines with keyword under cursor 190 | " and ask which one to jump to 191 | "nmap ff [I:let nr = input("Which one: ")exe "normal " . nr ."[\t" 192 | 193 | " Force saving when needing to sudo first" 194 | cnoreabbrev w!! 195 | \((getcmdtype() == ':' && getcmdline() == 'w!!') 196 | \?('!sudo tee % >/dev/null'):('w!!')) 197 | --------------------------------------------------------------------------------