Add repl plug in vim, update zsh, starship

This commit is contained in:
Smirnov Alexander 2021-05-16 12:13:21 +03:00
parent 04331d3e94
commit 5cf28d635b
5 changed files with 31 additions and 28 deletions

18
bin/gpe
View file

@ -1,18 +1,20 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# For working this script set in $GPG_KEY you gpg key # For working this script set $GPG_KEY with gpg key
## Functions ## Functions
function encrypt() { encrypt() {
gpg -ea -r $GPG_KEY $@ gpg -ea -r $GPG_KEY $@
} }
function decrypt() { decrypt() {
local fn="$1" local f="$1"
if [ ${fn: -4} == ".asc" ] if [ ${f: -4} == ".asc" ]
then gpg -d -o ${fn%%.asc} $@ then gpg -d -o ${f%%.asc} $@
elif [ ${fn: -4} == ".gpg" ] elif [ ${f: -4} == ".gpg" ]
then gpg -d -o ${fn%%.gpg} $@ then gpg -d -o ${f%%.gpg} $@
fi fi
} }
## Case's
case "$1" in case "$1" in
enc|e) shift; encrypt $@ ;; enc|e) shift; encrypt $@ ;;
dec|d) shift; decrypt $@ ;; dec|d) shift; decrypt $@ ;;

View file

@ -2,13 +2,13 @@ call plug#begin('~/.vim/plugged')
Plug 'Smirnov-O/nten.vim' Plug 'Smirnov-O/nten.vim'
Plug 'jiangmiao/auto-pairs' Plug 'jiangmiao/auto-pairs'
Plug 'sheerun/vim-polyglot' Plug 'sheerun/vim-polyglot'
Plug 'axvr/zepl.vim'
call plug#end() call plug#end()
"== General "== General
colo nten-light " Color scheme colo nten-light " Color scheme
set nu rnu " Line numbers set nu rnu cul " Line numbers & cursor highlight
set cursorline " Highlight line by cursor set lbr wrap " Line wrap
set linebreak wrap " Line wrap
set mouse=a mousehide " Mouse set mouse=a mousehide " Mouse
set ruler laststatus=0 " Status line set ruler laststatus=0 " Status line
set history=500 " Set history size set history=500 " Set history size
@ -31,7 +31,7 @@ set smarttab
set expandtab set expandtab
set autoindent set autoindent
"== Netrw file manager "== Netrw file tree
let g:netrw_liststyle=3 let g:netrw_liststyle=3
let g:netrw_banner=0 let g:netrw_banner=0
let g:netrw_dirhistmax=0 let g:netrw_dirhistmax=0
@ -49,16 +49,21 @@ com! GoFmt :silent !gofmt -w %
"== Mapping "== Mapping
let mapleader=";" let mapleader=";"
nn <C-S> :w<cr> nn <C-s> :w<cr>
nn <leader>t :Term<cr>
nn <space> :noh<cr> nn <space> :noh<cr>
tno <esc> <c-\><c-n>
nn <leader>t :Term<cr>
nn <leader>j :bn<cr> nn <leader>j :bn<cr>
nn <leader>k :bp<cr> nn <leader>k :bp<cr>
nn <leader>w :bd<cr> nn <leader>w :bd<cr>
nn <C-h> :wincmd h<cr> nn <C-h> :wincmd h<cr>
nn <C-j> :wincmd j<cr> nn <C-j> :wincmd j<cr>
nn <C-k> :wincmd k<cr> nn <C-k> :wincmd k<cr>
nn <C-l> :wincmd l<cr> nn <C-l> :wincmd l<cr>
tno <esc> <c-\><c-n>
nn cpp :ReplSend<cr>
vn cpp :ReplSend<cr>
nn spv :vs<cr> nn spv :vs<cr>
nn sph :sp<cr> nn sph :sp<cr>

View file

@ -1,17 +1,14 @@
add_newline = false add_newline = false
[nodejs] [nodejs]
symbol = "N.JS " symbol = "Node "
[python] [python]
symbol = "PY " symbol = "Py "
[elm] [elm]
symbol = "Elm " symbol = "Elm "
[java]
disabled = true
[package] [package]
symbol = "PKG " symbol = "PKG "

View file

@ -15,3 +15,4 @@
df = diff df = diff
dh = diff HEAD dh = diff HEAD
l = log --oneline --decorate l = log --oneline --decorate
st = status --porcelain

10
zshrc
View file

@ -10,22 +10,20 @@ export FZF_DEFAULT_COMMAND="rg --files --ignore-vcs"
### Oh my zsh ### Oh my zsh
export OMH="$HOME/.oh-my-zsh" export OMH="$HOME/.oh-my-zsh"
#ZSH_THEME="simple" # ZSH_THEME="simple"
DISABLE_AUTO_TITLE="true" DISABLE_AUTO_TITLE="true"
plugins=(docker npm) plugins=(docker npm)
source $OMH/oh-my-zsh.sh source $OMH/oh-my-zsh.sh
### Aliases ### Aliases
source ~/.aliases.sh source ~/.aliases.sh
alias cls="clear" alias cls="clear"
alias mkdir="mkdir -p" alias mkdir="mkdir -p"
alias cp="cp -r" alias cp="cp -r"
alias vim="nvim" vi="vim" alias vim="nvim"
alias vi="vim"
alias vimfzf='vim $(fzf)'
alias e="$EDITOR" alias e="$EDITOR"
alias tmux="tmux -2" alias tmux="tmux -2"
alias :q="exit" alias :q="exit"
alias ...="cd ../.." alias ...="cd ../.."