This commit is contained in:
Smirnov Olexandr 2020-12-06 16:30:44 +02:00
parent 7cf1432163
commit 2604920c97
3 changed files with 54 additions and 44 deletions

View file

@ -5,6 +5,7 @@ call plug#begin('~/.vim/plugged')
Plug 'itchyny/lightline.vim' Plug 'itchyny/lightline.vim'
Plug 'iamcco/markdown-preview.nvim' Plug 'iamcco/markdown-preview.nvim'
Plug 'dhruvasagar/vim-table-mode' Plug 'dhruvasagar/vim-table-mode'
Plug 'easymotion/vim-easymotion'
" File manger & seacher " File manger & seacher
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
@ -13,7 +14,6 @@ call plug#begin('~/.vim/plugged')
" Completion " Completion
Plug 'jiangmiao/auto-pairs' Plug 'jiangmiao/auto-pairs'
Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'easymotion/vim-easymotion'
" Language support " Language support
Plug 'pangloss/vim-javascript', { 'for': 'javascript' } Plug 'pangloss/vim-javascript', { 'for': 'javascript' }
@ -75,57 +75,48 @@ set background=dark
colorscheme NeoSolarized colorscheme NeoSolarized
" ======================= " == Plugins configure
" == Plugins configure == " Lightline
" ======================= set noshowmode
"""""""" Lightline """"""""
let g:lightline = { let g:lightline = {
\ 'colorscheme': 'selenized_dark', \ 'colorscheme': 'selenized_dark',
\ 'active': { \ 'active': {
\ 'left': [ [ 'mode', 'paste' ], \ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'modified', 'gitbranch' ] ], \ [ 'readonly', 'modified' ] ],
\ 'right': [ [ 'lineinfo' ], \ 'right': [ [ 'lineinfo' ],
\ [ 'percent' ], \ [ 'percent' ],
\ [ 'filename', 'fileencoding', 'filetype' ] ] \ [ 'filename', 'fileencoding', 'filetype' ] ]
\ }, } \ }, }
set noshowmode
"""""""""""""""""""""""""""
""""""""" Nerdtree """""""" " Nerdtree
map <C-b> :NERDTreeToggle<CR> map <C-b> :NERDTreeToggle<CR>
let g:NERDTreeWinPos="right" let g:NERDTreeWinPos="right"
let NERDTreeIgnore = ['__pycache__', '\.pyc$', '\.o$', '\.so$', '\.a$', '\.swp', '*\.swp', '\.swo', '\.swn', '\.swh', '\.swm', '\.swl', '\.swk', '\.sw*$', '[a-zA-Z]*egg[a-zA-Z]*', '.DS_Store'] let NERDTreeIgnore = ['__pycache__', '\.pyc$', '\.o$', '\.so$', '\.a$', '\.swp', '*\.swp', '\.swo', '\.swn', '\.swh', '\.swm', '\.swl', '\.swk', '\.sw*$', '[a-zA-Z]*egg[a-zA-Z]*', '.DS_Store']
let NERDTreeMinimalUI = 1 let NERDTreeMinimalUI = 1
let NERDTreeShowLineNumbers=0 let NERDTreeShowLineNumbers=0
"""""""""""""""""""""""""""
"""""""""""" Coc """""""""" " Coc
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>" inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>" inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
"""""""""""""""""""""""""""
""""""""" Markdown """""""" " Markdown
let g:vim_markdown_folding_disabled = 1 let g:vim_markdown_folding_disabled = 1
"""""""""""""""""""""""""
" Easymotion
"""""" Easymotion """""""""
let g:EasyMotion_do_mapping = 0 let g:EasyMotion_do_mapping = 0
let g:EasyMotion_smartcase = 1 let g:EasyMotion_smartcase = 1
nmap f <Plug>(easymotion-s) nmap f <Plug>(easymotion-s)
map <Leader>w <Plug>(easymotion-bd-w) map <Leader>w <Plug>(easymotion-bd-w)
nmap F <Plug>(easymotion-overwin-line) nmap F <Plug>(easymotion-overwin-line)
nmap s <Plug>(easymotion-overwin-f2) nmap s <Plug>(easymotion-overwin-f2)
"""""""""""""""""""""""""""
" CtrlP
map <C-p> :CtrlP<CR>
imap <C-p> :CtrlP<CR>
nmap <C-p> :CtrlP<CR>
" == Maping
" ============ imap fd <Esc>
" == Maping ==
" ============
imap ii <Esc>
let mapleader="," let mapleader=","
" Change window " Change window
@ -139,7 +130,7 @@ noremap <C-Tab> :tabnext<CR>
noremap <C-S-Tab> :tabprev<CR> noremap <C-S-Tab> :tabprev<CR>
noremap <C-n> :tabnew<CR> noremap <C-n> :tabnew<CR>
noremap <C-t> :tabnew<CR> noremap <C-t> :tabnew<CR>
noremap <C-w> :tabclose<CR> noremap <C-S-w> :tabclose<CR>
noremap <leader>1 :tabn 1<CR> noremap <leader>1 :tabn 1<CR>
noremap <leader>2 :tabn 2<CR> noremap <leader>2 :tabn 2<CR>
noremap <leader>3 :tabn 3<CR> noremap <leader>3 :tabn 3<CR>
@ -151,6 +142,3 @@ noremap <leader>8 :tabn 8<CR>
noremap <leader>9 :tabn 9<CR> noremap <leader>9 :tabn 9<CR>
noremap <leader>n :bnext<CR> noremap <leader>n :bnext<CR>
noremap <leader>p :bprev<CR> noremap <leader>p :bprev<CR>
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"

View file

@ -24,7 +24,7 @@ set vcs_msg_length 30
### Preview ### Preview
set preview_images true set preview_images true
set preview_images_method w3m set preview_images_method ueberzug
set w3m_delay 0.02 set w3m_delay 0.02
set w3m_offset 0 set w3m_offset 0

View file

@ -1,5 +1,4 @@
#!/bin/sh #!/bin/sh
declare options=("i3 declare options=("i3
berry berry
qtile qtile
@ -8,22 +7,21 @@ polybar
picom picom
dunst dunst
qutebrowser qutebrowser
taskwarrior
tmux tmux
vim vim
neovim ranger
kitty term
taskwarrior sh")
fish
zsh")
choice=$(echo -e "${options[@]}" | dmenu -p 'Edit config file: ' $@) choice=$(echo -e "${options[@]}" | dmenu -p 'Edit config file' $@)
case "$choice" in case "$choice" in
i3) choice="$HOME/.config/i3/config" ;; i3) choice="$HOME/.config/i3/config" ;;
qtile) qtile)
opt=$(echo -e "config.py\nautostart"|dmenu -p 'Qtile' $@) opt=$(echo -e "config.py\nautostart"|dmenu -p 'Qtile' $@)
case "$opt" in case "$opt" in
"config.py") choice="$HOME/.config/qtile/config.py" ;; "config.py") choice="$HOME/.config/qtile/config.py" ;;
"autostart") choice="$HOME/.config/qtile/autostart.sh" ;; "autostart.sh") choice="$HOME/.config/qtile/autostart.sh" ;;
esac esac
;; ;;
berry) berry)
@ -44,22 +42,46 @@ case "$choice" in
esac esac
;; ;;
picom) choice="$HOME/.config/picom.conf" ;; picom) choice="$HOME/.config/picom.conf" ;;
tmux) choice="$HOME/.tmux.conf" ;;
polybar) choice="$HOME/.config/polybar/config" ;; polybar) choice="$HOME/.config/polybar/config" ;;
qutebrowser) qutebrowser)
why=$(echo -e "config.py\nquickmarks" | dmenu -h 24 -p 'Qutebrowser') why=$(echo -e "config.py\nquickmarks" | dmenu -p 'Qutebrowser')
case "$why" in case "$why" in
"config.py") choice="$HOME/.config/qutebrowser/config.py" ;; "config.py") choice="$HOME/.config/qutebrowser/config.py" ;;
"quickmarks") choice="$HOME/.config/qutebrowser/quickmarks" ;; "quickmarks") choice="$HOME/.config/qutebrowser/quickmarks" ;;
esac esac
;; ;;
ranger)
why=$(echo -e "rc.conf\nrifle.conf")
case "$why" in
"rc.conf") choice="$HOME/.config/ranger/rc.conf" ;;
"rifle.conf") choice="$HOME/.config/ranger/rifle.conf" ;;
esac
;;
vim)
why=$(echo -e "nvim\nvim"|dmenu -p 'Vim' $@)
case "$why" in
vim) choice="$HOME/.vimrc" ;; vim) choice="$HOME/.vimrc" ;;
nvim) choice="$HOME/.config/nvim/init.vim" ;; nvim) choice="$HOME/.config/nvim/init.vim" ;;
dunst) choice="$HOME/.config/dunst/dunstrc" ;; esac
zsh) choice="$HOME/.zshrc" ;; ;;
taskwarior) choice="$HOME/.taskrc" ;; tmux) choice="$HOME/.tmux.conf" ;;
fish) choice="$HOME/.config/fish/config.fish" ;; term)
why=$(echo -e "kitty\nalacritty"|demnu -p "Term" $@)
case "$why" in
kitty) choice="$HOME/.config/kitty/kitty.conf" ;; kitty) choice="$HOME/.config/kitty/kitty.conf" ;;
alacritty) choice="$hoME/.config/alacritty/alacritty.yml" ;;
esac
;;
dunst) choice="$HOME/.config/dunst/dunstrc" ;;
sh)
why=$(echo -e "zsh\nfish\nbash"|dmenu -p "Shell" $@)
case "$why" in
zsh) choice="$HOME/.zshrc" ;;
fish) choice="$HOME/.config/fish/config.fish" ;;
bash) choice="$hoME/.bashrc"
esac
;;
taskwarior) choice="$HOME/.taskrc" ;;
*) exit 1 ;; *) exit 1 ;;
esac esac
kitty -e nvim "$choice" kitty -e nvim "$choice"