Skip to content

Instantly share code, notes, and snippets.

@Agyar
Last active March 15, 2020 21:04
Show Gist options
  • Save Agyar/46c8622bf1bf3cd08a944c3c0e620e4a to your computer and use it in GitHub Desktop.
Save Agyar/46c8622bf1bf3cd08a944c3c0e620e4a to your computer and use it in GitHub Desktop.
Neovim config
set-option -g allow-rename off
bind-key -n M-K new-window -c "#{pane_current_path}"
bind-key -n M-H prev
bind-key -n M-J resize-pane -Z
bind-key -n M-L next
bind-key -n M-k select-pane -U
bind-key -n M-j select-pane -D
bind-key -n M-h select-pane -L
bind-key -n M-l select-pane -R
bind-key -n M-B split-window -h -c "#{pane_current_path}"
bind-key -n M-V split-window -c "#{pane_current_path}"
bind -n C-left swap-window -t -1
bind -n C-right swap-window -t +1
bind -n M-C-w kill-window
bind-key -n M-v copy-mode
setw -g mode-keys vi
unbind p
bind p paste-buffer
#bind-key -t vi-copy 'v' begin-selection
# TODO not working v
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection
bind-key -T copy-mode-vi 'r' send-keys -X rectangle-toggle
bind-key -T copy-mode-vi 'v' send-keys -X copy-pipe "xargs -I 'URL' sh -c 'tmux new-window \"mpv \\\"URL\\\"\"; tmux last-window' move"
bind-key -T copy-mode-vi 'V' send-keys -X copy-pipe "xargs -I 'URL' sh -c 'tmux new-window \"youtube-dl \\\"URL\\\"\"; tmux last-window' move"
bind-key g send-prefix
bind-key C-a last-window
bind-key S set-window-option synchronize-panes \;\
display 'Broadcast'
set-option -g prefix C-G
set -g base-index 1
set -s escape-time 0
setw -g aggressive-resize on
set-window-option -g window-status-current-fg black
set-window-option -g window-status-current-bg white
set -g status-bg cyan
set-window-option -g window-status-current-attr none
set -g pane-border-fg cyan
set -g pane-active-border-fg white
# make it easy to grab a pane and put it into the current window
bind-key @ command-prompt -p "create pane from:" "join-pane -s ':%%'"
# Select link
bind-key -n M-u run-shell "$HOME/.tmux/plugins/tmux-copycat/scripts/copycat_mode_start.sh '(https?://|git@|git://|ssh://|ftp://|file:///)[[:alnum:]?=%/_.:,;~@!#$&()*+-]*'"
# Select file
bind-key -n M-f run-shell "$HOME/.tmux/plugins/tmux-copycat/scripts/copycat_mode_start.sh '(?<=[[:space:]"]|^)(?!.*pts/.*)([^[:space:]:@("]+[./][^[:space:]:@"]+)(?=[[:space:]"]|$)'"
#bind-key -n M-f run-shell "$HOME/.tmux/plugins/tmux-copycat/scripts/copycat_mode_start.sh '([^[:space:]:@]+[./][^[:space:]:@]+)'"
# Select prompt
bind-key -n M-p run-shell "$HOME/.tmux/plugins/tmux-copycat/scripts/copycat_mode_start.sh '[[:alnum:]]+@[[:alnum:]]+:pts/[[:digit:]]*'"
# Rotate windows with repeat option
bind-key -r C-o rotate-window
# Paste tmux buffer
bind C-p run "tmux paste-buffer"
# Move tmux copy buffer into x clipboard
bind C-y run "tmux show-buffer | xclip -i"
## Mouse (version 2.0)
#set-window-option -g mode-mouse on
#set-option -g mouse-select-pane on
#set-option -g mouse-resize-pane on
#set-option -g mouse-select-window on
# Mouse (version 2.0)
set-option -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
# add tmux scrolling with page-up and down
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g default-terminal "screen-256color"
bind-key -r C-left resize-pane -L
bind-key -r C-right resize-pane -R
bind-key -r C-up resize-pane -U
bind-key -r C-down resize-pane -D
bind-key z resize-pane -Z
bind-key -n C-space last-window
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-resurrect'
#set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'
#set -g @plugin 'jbnicolai/tmux-fpp'
set -g @plugin 'tmux-plugins/tmux-urlview'
set -g @plugin 'erikw/tmux-powerline'
set-option -g default-shell /bin/zsh
#set -g @continuum-restore 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
set $mod Mod4
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
#set $term urxvt
set $term termite
# Your preferred application launcher
set $menu dmenu_run
gaps inner 8
gaps outer 0
new_window pixel 0
new_float pixel 0
#hide_edges_borders both
input "2:7:SynPS/2_Synaptics_TouchPad" {
tap enabled
dwt enabled
middle_emulation enabled
natural_scroll disabled
}
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%
bindsym XF86AudioMute exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle
bindsym XF86MonBrightnessDown exec dsplight down 5
bindsym XF86MonBrightnessUp exec dsplight up 5
output * bg /home/ben/Medias/Pictures/1432724478852.png fill
#
# start a terminal
bindsym $mod+Return exec $term
binsym $mod+t kill; exec $term
# kill focused window
bindsym $mod+Shift+q kill
# start your launcher
bindsym $mod+d exec $menu
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# reload the configuration file
bindsym $mod+Shift+c reload
# exit sway (logs you out of your wayland session)
bindsym $mod+Shift+e exit
bindsym $mod+Shift+s exec urxvt -e systemctl suspend
bindsym $mod+Shift+n exec nautilus
bindsym $mod+Shift+f exec firefox
bindsym $mod+Shift+t exec urxvt -cd /home/ben -e make &
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
bindsym $mod+Shift+Return exec swaylock -i /home/ben/Medias/Pictures/1433328662112.jpg
# _move_ the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# switch to workspace
bindsym $mod+ampersand workspace 1
bindsym $mod+eacute workspace 2
bindsym $mod+quotedbl workspace 3
bindsym $mod+apostrophe workspace 4
bindsym $mod+parenleft workspace 5
bindsym $mod+minus workspace 6
bindsym $mod+egrave workspace 7
bindsym $mod+underscore workspace 8
bindsym $mod+ccedilla workspace 9
bindsym $mod+agrave workspace 10
# move focused container to workspace
bindsym $mod+Shift+ampersand move container to workspace 1
bindsym $mod+Shift+eacute move container to workspace 2
bindsym $mod+Shift+quotedbl move container to workspace 3
bindsym $mod+Shift+apostrophe move container to workspace 4
bindsym $mod+Shift+parenleft move container to workspace 5
bindsym $mod+Shift+minus move container to workspace 6
bindsym $mod+Shift+egrave move container to workspace 7
bindsym $mod+Shift+underscore move container to workspace 8
bindsym $mod+Shift+ccedilla move container to workspace 9
bindsym $mod+Shift+agrave move container to workspace 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+F fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# move focus to the parent container
bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+twosuperior move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+twosuperior scratchpad show
#
# Resizing containers:
#
mode "resize" {
bindsym $left resize shrink width 10 px or 10 ppt
bindsym $up resize grow height 10 px or 10 ppt
bindsym $down resize shrink height 10 px or 10 ppt
bindsym $right resize grow width 10 px or 10 ppt
# ditto, with arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Up resize grow height 10 px or 10 ppt
bindsym Down resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position top
colors {
statusline #dadbc7
background #282c34
inactive_workspace #32323200 #32323200 #5c5c5c
}
font Awesome
separator_symbol " "
#status_command i3status -c /home/ben/.config/sway/i3status.conf
#status_command python /home/ben/.config/sway/mypystatus.py
#status_command py3status
#status_command py3status -c /home/ben/.config/sway/mypythonstatus.conf
status_command py3status -c /home/ben/.config/sway/i3status.conf -i /home/ben/.local/lib/python3.6/site-packages/
}
# You may want this:
#
# include ~/.config/sway/conf.d/*
#
# Protip:
#
# include ~/.config/sway/`hostname`/*
exec xrdb ~/.Xresources
general {
output_format = "i3bar"
colors = true
interval = 5
markup="pango"
color_bad='#E84F4F'
color_degraded ='#FFE863'
color_good ='#BDE077'
}
order += "spotify"
#order += "dbus_notifier"
order += "google_calendar"
order += "tztime local"
order += "twitch"
order += "arch_updates"
order += "diskdata"
order += "wifi"
order += "ethernet _first_"
order += "battery_level"
#order += whoami
order += "volume master"
twitch {
stream = 'ogamingsc2'
client = '9y2b6pvrlkg0ziua4dnki1p1dwdwdt'
color_live = '#6441a5'
color_rediff= '#AACCBB'
color_error = '#E84F4F'
#watcher = 'nohup urxvt -e mpv --cache=10000'
}
arch_updates {
format = " {total}"
hide_if_zero = True
color = '#AACCBB'
}
dbus_notifier {
format = "{events}"
}
google_calendar {
format = "{events}"
client_secret = "/home/ben/.config/sway/client_secret.json"
color = '#E16A98'
}
whoami {
format = " {username}"
}
wifi {
format = " [\?if=is_toggled {signal_percent} {ssid}]"
}
wireless _first_ {
format_up = "<span font='FontAwesome'> %quality %essid</span>"
#format_down = "<span font='FontAwesome'> down</span>"
format_down = ""
}
ethernet _first_ {
format_up = "E: connected"
format_down = ""
}
battery_level {
blocks = ""
format = "{icon} [\?if=is_toggled {percent}%]"
color_good = "#BDE077"
color_charging = "#BDE077"
color_bad="#E84F4F"
color_degraded ="#FFE863"
}
tztime local {
format = "%a %d %b %H:%M:%S |"
}
spotify {
format = " [\?if=is_toggled {title} by {artist}]"
format_down = ""
}
load {
format = "%1min"
}
diskdata {
#format = "[\?color=free  ][\?if=is_toggled {free}]"
#format = "[\?color=bad  [\?color=free {free}]]"
#format = "[\?color=free {}]"
format = "[\?if=is_toggled {free}]"
disk = '/dev/mapper/vg-root'
thresholds = { 'free' : [ (2, 'bad'), (8, 'degraded'), (40,'good'), ],}
color_bad='#E84F4F'
color_degraded ='#FFE863'
color_good ='#BDE077'
}
volume master {
format = "<span font='FontAwesome'></span> %volume"
format_muted = "<span color='#e84f4f' font='FontAwesome'> %volume</span>"
device = "default"
mixer = "Master"
mixer_idx = 0
}
call plug#begin('~/.config/nvim/plugins')
" Colorscheme
Plug 'nightsense/simplifysimplify'
" Snippets ------------------------------------------
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
" UI ------------------------------------------------
Plug 'majutsushi/tagbar'
Plug 'wellle/visual-split.vim'
Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
" latex plugins -------------------------------------
Plug 'lervag/vimtex' ,{'for': 'tex'}
Plug 'languagetool-org/languagetool',{'for': 'tex'}
Plug 'reedes/vim-lexical' ,{'for': 'tex'}
Plug 'dominikduda/vim_current_word' ,{'for': 'tex'}
Plug 'dbmrq/vim-ditto' ,{'for': 'tex'}
" TODO order ----------------------------------------
Plug 'vim-scripts/L9'
Plug 'vim-scripts/FuzzyFinder'
Plug 'Agyar/vim-calzone'
Plug 'mhinz/neovim-remote'
Plug 'Shougo/denite.nvim'
Plug 'Shougo/vimproc.vim'
Plug 'powerman/vim-plugin-AnsiEsc'
Plug 'AndrewRadev/linediff.vim'
Plug 'chrisbra/Colorizer'
" Shorcuts ------------------------------------------
Plug 'vim-scripts/quick-scope'
Plug 'AndrewRadev/splitjoin.vim'
Plug 'junegunn/vim-easy-align'
Plug 'easymotion/vim-easymotion'
Plug 'scrooloose/nerdcommenter'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'FelikZ/ctrlp-py-matcher'
" Completion --------------------------------------
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'Agyar/deoplete-jrnl', {'for': 'text'}
Plug 'zchee/deoplete-jedi', {'for':'python'}
Plug 'zchee/deoplete-go', { 'for':'go', 'do': 'make'}
" Git ----------------------------------------------
Plug 'tpope/vim-fugitive'
Plug 'lambdalisue/gina.vim'
Plug 'jreybert/vimagit'
" Python -------------------------------------------
Plug 'metakirby5/codi.vim', {'for':'python'}
Plug 'nvie/vim-flake8', {'for':'python'}
" Go -----------------------------------------------
Plug 'fatih/vim-go', { 'for': 'go', 'do': ':GoInstallBinaries' }
Plug 'nsf/gocode', { 'for': 'go', 'do': '~/.vim/plugged/gocode/vim/symlink.sh'}
Plug 'jodosha/vim-godebug', { 'for': 'go'}
" Linting ------------------------------------------
"Plug 'neomake/neomake'
Plug 'w0rp/ale', {'for': ['go', 'python', 'c', 'cpp']}
" Bar ----------------------------------------------
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
call plug#end()
"________________________________
" BASIC THINGS
filetype plugin indent on "set indentation plugin depending on filetype
syntax on "enable syntax coloring
" colorscheme mushishi
"________________________________
" SET OPTIONS
set ai " set auto indent
set nu " set number lines on
set mouse=a " enable mouse in vim
"set ttymouse=xterm2 " enable window resize by mouse when running under tmux/xterm
set wildmenu " enable completion menu for : commands like :e
set laststatus=2 " enable second status bar
set hlsearch " set highlighted research results
set pumheight=10 " Set completion menu width to 10
set backspace=2 " Make Backspace work on EDF computer
set ignorecase smartcase "ignore case when search is all in lowercase
set wildignore=*.obj,*.exe,*.o,*.swp,*.dvi,*.aux,*.pdf "ignore those file extensions when :e
set tabstop=2 shiftwidth=2 noexpandtab "Change ridiculous 8-wide tabs
set scrolloff=10 " Keep a few lines after the current for context
set showcmd " display incomplete commands
set incsearch " set incremental search
set t_Co=256 " setting vim to use 256 colors
set diffopt+=iwhite " Ignore les espaces pour vimdiff
set fillchars=vert:\│ " pimp the vertical split character to be a full line
set confirm " remove use of ! in most cases
set encoding=utf-8 " let vim encode characters in utf-8
set expandtab
set smarttab
set ofu=syntaxcomplete#Complete
set completeopt=menuone,menu,longest,preview
set cinkeys-=0# " force vim to indent #pragma stuff
set hidden " keep buffers and history instead of closing them when :e
set infercase " allow for a smatter case sensitive completion
set nowrapscan " do not loop when searching
set nobackup " do not store files~
set noswapfile " stop fucking swaping files
set tags=/home/ben/.thesis_tags,./tags,tags " add homie tags by default
set clipboard=unnamedplus
set lazyredraw
"________________________________
" LET OPTIONS
let mapleader="," " set the map leader
" DEOPLETE CONFIGURATION -----------------------------------
let g:deoplete#enable_at_startup = 1
let g:deoplete#auto_complete_start_length = 1
let g:deoplete#sources#go#gocode_binary = $GOPATH.'/usr/bin/gocode'
let g:deoplete#sources#go#sort_class = ['package', 'func', 'type', 'var', 'const']
let g:deoplete#sources#go#cgo = 1
let g:deoplete#sources#go#cgo#libclang_path = '/usr/lib/libclang.so'
let g:deoplete#sources#go#auto_goos = 1
call deoplete#custom#set('_', 'sorters', ['sorter_word'])
call deoplete#custom#set('ultisnips', 'rank', 9999)
" ULTISNIPS CONFIGURATION -----------------------------------
"let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsExpandTrigger="<Leader><tab>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
let g:snips_author = 'Benjamin Lorendeau'
" AIRLINE CONFIGURATION -----------------------------------
let g:airline#extensions#whitespace#enabled = 0
let g:airline_left_sep = ''
let g:airline_right_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_alt_sep = ''
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ''
let g:airline#extensions#tabline#left_alt_sep = ''
let g:airline#extensions#tabline#right_sep = ''
let g:airline#extensions#tabline#right_alt_sep = ''
let g:airline#extensions#branch#symbol = ''
let g:airline#extensions#ale#enabled = 1
let g:airline_theme = 'base16_ashes'
" ALE CONFIGURATION ----------------------------------
"let g:ale_sign_error = 'EE'
"let g:ale_sign_warning = 'WW'
let g:ale_sign_error = '⤫'
let g:ale_sign_warning = '⚠'
let g:ale_sign_column_always = 1
let g:ale_lint_on_text_changed = 'never'
let g:ale_fixers = {
\ 'c': ['clang-format'],
\ 'python': ['autopep8', 'isort', 'yapf'],
\}
" VIMTEX CONFIGURATION ----------------------------------
au FileType latex let g:vimtex_compiler_progname = 'nvr'
au FileType latex let g:vimtex_compiler_options="-pdf -pdflatex='pdflatex -file-line-error -shell-escape -synctex=1'"
au FileType latex let g:vimtex_view_method = 'zathura'
au FileType latex let g:vimtex_quickfix_enabled = 0
au FileType latex let g:tex_flavor = "latex"
au FileType latex let ttags_display='locations' " can be locations, quickfix, tlib
au FileType latex let g:netrw_list_hide= '.*\.swp$,.*\.o$,*\.aux,*\.dvi' "make :Sexplore ignore files like .o and .swp in menu
au FileType latex let g:limelight_conceal_ctermfg = 8
au FileType latex let g:goyo_width = 190
au FileType latex let g:vimtex_echo_ignore_wait = 1
au FileType latex let g:vim_current_word#highlight_twins = 1
au FileType latex let g:vim_current_word#highlight_current_word = 1
au FileType latex let g:vim_current_word#enabled = 0
au FileType latex let g:ditto_hlgroups = ['Ditto1', 'Ditto2', 'Ditto3', 'Ditto4', 'Ditto5', 'Ditto6', 'Ditto7', 'Ditto8', 'Ditto9', 'Ditto10']
" ctrlp plugin -------------------------
let g:ctrl_map = '<c-p>'
let g:ctrl_cmd = 'CtrlP'
let g:ctrl_working_path_mode = 'ra'
let g:ctrlp_root_markers = ['pom.xml', '.p4ignore']
let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' }
" GO SPECIFIC PARAMS
let g:go_highlight_build_constraints = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_fields = 1
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_operators = 1
let g:go_highlight_structs = 1
let g:go_highlight_types = 1
let g:go_auto_sameids = 1
let g:go_fmt_command = "goimports" " auto import packages as we save
"________________________________
" MAPPINGS
nnoremap <Leader>m :w<CR> :!make<CR>
map <Leader>y "*y
map <Leader>p "*p
map <Leader>gf :tabe <cfile>
noremap ; .
noremap . ;
vmap T Jgqgq
nnoremap Y y$
nnoremap <F4> :%s/<c-r><c-w>/<c-r><c-w>/gc<c-f>$F/i
cabbr <expr> %% expand('%:p:h')
cmap w!! w !sudo tee % >/dev/null
inoremap <C-L> <C-O>:nohls<CR>
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
nnoremap <C-Return> <C-w><C-]><C-w>T
map <Leader>co :e $HOME/.config/nvim/init.vim<CR>
" PLUGINS CALLS ---------------------
map <Leader>d :DittoUpdate<CR>:ToggleDitto<CR>
nnoremap <Leader>h :Calzone<CR>
nnoremap <Leader>g :Goyo<CR>
" SPELLING MAPPINGS ------------------------------
map <Leader>ss :setlocal spell!<CR>
map <Leader>se :set spelllang=en<CR>
map <Leader>sf :set spelllang=fr<CR>
map <Leader>sn ]sz=
map <Leader>sN [sz=
nnoremap ]S [s
" EASYALIGN MAPPINGS
xmap ga <Plug>(EasyAlign)
xmap gal <Plug>(EasyAlign)*&<CR>
nmap ga <Plug>(EasyAlign)<Paste>
" EASY MOTIONS MAPPINGS -------------------------------
map <Leader><Leader> <Plug>(easymotion-prefix)
"map <Leader>j <Plug>(easymotion-prefix)
"map <space><space> <Plug>(easymotion-overwin-line)
"map <Leader><Leader> <Plug>(easymotion-overwin-f)
" GINA MAPPINGS -------------------------------
map <Leader>gs :tabnew<CR>:Gina status -s<CR>
map <Leader>gc :Gina commit<CR>
map <Leader>gp :Gina push<CR>:tabclose<CR>:tabp<CR>
map <Leader>gl :Gina log<CR>
map <Leader>gd :Gina diff<CR>
" GO MAPPINGS
au FileType go map <Leader>Gb :call GoToggleBreakpoint()<CR>
au FileType go map <Leader>Gd :call GoDebug()<CR>
au FileType go map <Leader>Gt :GoDeclsDir<CR>
au FileType go map <leader>Ga <Plug>(go-alternate-edit)
au FileType go map <leader>Gah <Plug>(go-alternate-split)
au FileType go map <leader>Gav <Plug>(go-alternate-vertical)
au FileType go nmap <F10> :GoTest -short<cr>
au FileType go nmap <F9> :GoCoverageToggle -short<cr>
" VIMTEX MAPPINS ------------------------------
au FileType latex map <Leader>vt :VimtexTocToggle<CR>
au FileType latex map <Leader>vb :VimtexCompile<CR>
au FileType latex map <Leader>vv :VimtexView<CR>
" LATEX MAPPINGS -----------------------
au FileType latex nnoremap <C-z> i$<ESC>ea$<ESC>w
au FileType latex nnoremap <S-z> i\textbf{<ESC>ea}<ESC>w
au FileType latex vnoremap <S-z> <Esc>`>a}<Esc>`<i\textbf{<Esc>
" MOVING MAPPINGS ----------------------------
nnoremap <Leader>n :bNext<CR>
nnoremap <Tab> :tabnext<CR>
nnoremap <S-Tab> :tabprevious<CR>
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
" OTHER STUFF -------------------
let g:tagbar_compact = 1
au FileType latex let g:tagbar_type_tex = {
\ 'ctagstype' : 'latex',
\ 'kinds' : [
\ 's:sections',
\ 'g:graphics:0:0',
\ 'l:labels',
\ 'r:refs:1:0',
\ 'p:pagerefs:1:0'
\ ],
\ 'sort' : 0,
\ }
" Load all plugins now.
" Plugins need to be added to runtimepath before helptags can be generated.
packloadall
" Load all of the helptags now, after plugins have been loaded.
" All messages and errors will be ignored.
silent! helptags ALL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment