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
# For working this script set in $GPG_KEY you gpg key
# For working this script set $GPG_KEY with gpg key
## Functions
function encrypt() {
encrypt() {
gpg -ea -r $GPG_KEY $@
}
function decrypt() {
local fn="$1"
if [ ${fn: -4} == ".asc" ]
then gpg -d -o ${fn%%.asc} $@
elif [ ${fn: -4} == ".gpg" ]
then gpg -d -o ${fn%%.gpg} $@
decrypt() {
local f="$1"
if [ ${f: -4} == ".asc" ]
then gpg -d -o ${f%%.asc} $@
elif [ ${f: -4} == ".gpg" ]
then gpg -d -o ${f%%.gpg} $@
fi
}
## Case's
case "$1" in
enc|e) shift; encrypt $@ ;;
dec|d) shift; decrypt $@ ;;

View file

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

View file

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

View file

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

8
zshrc
View file

@ -17,15 +17,13 @@ source $OMH/oh-my-zsh.sh
### Aliases
source ~/.aliases.sh
alias cls="clear"
alias mkdir="mkdir -p"
alias cp="cp -r"
alias vim="nvim" vi="vim"
alias vim="nvim"
alias vi="vim"
alias vimfzf='vim $(fzf)'
alias e="$EDITOR"
alias tmux="tmux -2"
alias :q="exit"
alias ...="cd ../.."