better vim configuration and import omz plugins

This commit is contained in:
odrling 2019-01-11 19:13:34 +01:00
parent 73f522a0a2
commit e1a5eba377
4 changed files with 35 additions and 13 deletions

@ -1 +1 @@
Subproject commit 626eaae347e0642074469738502912b6765bc3b7
Subproject commit 023fd7182c7ddab0db3e8b6856325a561c36d345

View file

@ -1,6 +1,8 @@
# prefix Control + N
set-option -g prefix C-n
set-option -sg escape-time 10
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
@ -62,7 +64,7 @@ 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"
set -g default-terminal "screen-256color"
# The modes
setw -g clock-mode-colour colour135

30
.vimrc
View file

@ -32,6 +32,7 @@
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Sets how many lines of history VIM has to remember
set history=500
set number relativenumber
" Enable filetype plugins
filetype plugin on
@ -46,6 +47,9 @@ let mapleader = ","
" Fast saving
nmap <leader>w :w!<cr>
nmap <leader>j :wn<cr>
nmap <leader>k :wN<cr>
nmap <leader>; A;<esc>
" :W sudo saves the file
" (useful for handling the permission-denied error)
@ -134,9 +138,9 @@ set foldcolumn=1
syntax enable
" Enable 256 colors palette in Gnome Terminal
if $COLORTERM == 'gnome-terminal'
set t_Co=256
endif
" if $COLORTERM == 'gnome-terminal'
" set t_Co=256
" endif
try
colorscheme desert
@ -327,6 +331,26 @@ map <leader>x :e ~/buffer.md<cr>
" Toggle paste mode on and off
map <leader>pp :setlocal paste!<cr>
" Move to the next marker
inoremap <Space><Space> <Esc>/<++><Enter>"_c4l
" adathings
autocmd FileType ada inoremap if if then<CR><++><CR>end if;<CR><++><Esc>3k0e2li
autocmd FileType ada inoremap while while loop<CR><++><CR>end loop;<CR><++><Esc>3k0e2li
autocmd FileType ada inoremap for for loop<CR><++><CR>end loop;<CR><++><Esc>3k0e2li
autocmd FileType ada inoremap proc procedure (<++>) is<CR><++><CR>end;<CR><++><ESC>3kela
autocmd FileType ada inoremap pros procedure (<++>);<CR><++><ESC>k^ela
autocmd FileType ada inoremap func function (<++>) return <++><CR>end;<CR><++><ESC>3kela
autocmd FileType ada inoremap funs function (<++>) return <++>;<CR><++><ESC>k^ela
autocmd FileType ada inoremap pack package is<CR><++><CR>end;<CR><++><ESC>3kela
" pythonthings
autocmd FileType python map #! ggi#!/usr/bin/env python3<CR>
autocmd FileType python map ;m oif __name__ == '__main__':<CR>main()<ESC>^
autocmd FileType python inoremap try: except: <++>:<CR><++><ESC>2kotry:<CR>
" shellthings
autocmd FileType sh map #! ggi#!/bin/sh<CR>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Helper functions

12
.zshrc
View file

@ -1,14 +1,10 @@
if ! which antibody > /dev/null 2>&1; then
echo "installing antibody"
curl -sL git.io/antibody | sh -s
fi
# load modules
source ~/.zsh/*/*.zsh
source ~/.zsh/omz/oh-my-zsh/lib/spectrum.zsh
source ~/.zsh/omz/oh-my-zsh/plugins/pass
source ~/.zsh/omz/oh-my-zsh/plugins/ssh-agent
source ~/.zsh/omz/oh-my-zsh/plugins/adb
#source ~/.zsh/omz/oh-my-zsh/plugins/pass/*.zsh
source ~/.zsh/omz/oh-my-zsh/plugins/ssh-agent/*.zsh
#source ~/.zsh/omz/oh-my-zsh/plugins/adb/*.zsh
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**'