mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
Add vim-suround in nvim config
This commit is contained in:
parent
d50fc737a8
commit
5c2b55f13c
8 changed files with 31 additions and 81 deletions
|
|
@ -15,11 +15,9 @@ shell=$(basename $SHELL)
|
||||||
manager=$(which apt pacman yay apk xbps-query 2>/dev/null)
|
manager=$(which apt pacman yay apk xbps-query 2>/dev/null)
|
||||||
manager=${manager##*/}
|
manager=${manager##*/}
|
||||||
case "$manager" in
|
case "$manager" in
|
||||||
apt) packages="$(dpkg-query -f '${binary:Package}\n' -W | wc -l)";;
|
apt) packages="$(dpkg-query -f '${binary:Package}\n' -W | wc -l)";;
|
||||||
pacman) packages="$(pacman -Q | wc -l)";;
|
yay) packages="$(yay -Q | wc -l)";;
|
||||||
yay) packages="$(yay -Q | wc -l)";;
|
pacman) packages="$(pacman -Q | wc -l)";;
|
||||||
apk) packages="$(apk list --installed | wc -l)";;
|
|
||||||
xbps-query) packages="$(xbps-query -l | wc -l)";;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,9 @@ Run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
###== Autostart
|
###== Autostart
|
||||||
Run setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" &
|
|
||||||
Run feh --randomize --bg-scale ~/Pictures/wallp &
|
Run feh --randomize --bg-scale ~/Pictures/wallp &
|
||||||
Run sxhkd -c ~/.config/bspwm/sxhkd &
|
Run sxhkd -c ~/.config/bspwm/sxhkd &
|
||||||
~/.config/bspwm/bar.sh &
|
~/.config/bspwm/bar.sh &
|
||||||
Run ~/.script/autolock &
|
|
||||||
Run lxsession &
|
Run lxsession &
|
||||||
Run picom -b &
|
Run picom -b &
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('~/.vim/plugged')
|
||||||
Plug 'Smirnov-O/nten16.vim'
|
Plug 'Smirnov-O/nten16.vim'
|
||||||
Plug 'itchyny/lightline.vim'
|
|
||||||
Plug 'jiangmiao/auto-pairs'
|
Plug 'jiangmiao/auto-pairs'
|
||||||
Plug 'maxboisvert/vim-simple-complete'
|
Plug 'maxboisvert/vim-simple-complete'
|
||||||
Plug 'sheerun/vim-polyglot'
|
Plug 'sheerun/vim-polyglot'
|
||||||
Plug 'ap/vim-css-color'
|
Plug 'tpope/vim-surround'
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
"== General
|
"== General
|
||||||
|
|
@ -27,9 +26,13 @@ set expandtab
|
||||||
set autoindent
|
set autoindent
|
||||||
|
|
||||||
" Status line
|
" Status line
|
||||||
set noshowmode showcmd
|
set laststatus=0
|
||||||
|
set showmode showcmd
|
||||||
set ruler
|
set ruler
|
||||||
|
|
||||||
|
" Scroll
|
||||||
|
set scrolloff=3
|
||||||
|
|
||||||
" Mouse
|
" Mouse
|
||||||
set mouse=a
|
set mouse=a
|
||||||
set mousehide
|
set mousehide
|
||||||
|
|
@ -41,7 +44,7 @@ set fileencodings=utf-8
|
||||||
|
|
||||||
" Backup file & history
|
" Backup file & history
|
||||||
set nobackup noswapfile
|
set nobackup noswapfile
|
||||||
set history=100
|
set history=500
|
||||||
|
|
||||||
" Search
|
" Search
|
||||||
set incsearch
|
set incsearch
|
||||||
|
|
@ -51,20 +54,12 @@ set smartcase
|
||||||
" Enable mode line
|
" Enable mode line
|
||||||
set modeline
|
set modeline
|
||||||
|
|
||||||
" File explorer
|
|
||||||
let g:netrw_banner = 0
|
|
||||||
let g:netrw_browse_split = 2
|
|
||||||
let g:netrw_winsize = 15
|
|
||||||
|
|
||||||
" Auto reload file
|
" Auto reload file
|
||||||
set autoread
|
set autoread
|
||||||
|
|
||||||
" Buffer
|
" Buffer
|
||||||
set hidden
|
set hidden
|
||||||
|
|
||||||
" Spell checker
|
|
||||||
set nospell spelllang=en_us
|
|
||||||
|
|
||||||
" Space/tab indicator
|
" Space/tab indicator
|
||||||
set list listchars=tab:\|·,trail:~,extends:>,precedes:<,space:·
|
set list listchars=tab:\|·,trail:~,extends:>,precedes:<,space:·
|
||||||
|
|
||||||
|
|
@ -72,16 +67,15 @@ set list listchars=tab:\|·,trail:~,extends:>,precedes:<,space:·
|
||||||
set visualbell t_vb=
|
set visualbell t_vb=
|
||||||
|
|
||||||
"== Settings for specific files
|
"== Settings for specific files
|
||||||
autocmd BufWritePre *.py normal m`:%s/\s\+$//e ``
|
autocmd BufWritePre *.py normal m`:%s/\s\+$//e `
|
||||||
autocmd FileType python,go,json setlocal expandtab shiftwidth=4 tabstop=4
|
autocmd FileType python,go,json setlocal expandtab shiftwidth=4 tabstop=4
|
||||||
autocmd FileType html,css,javascript,javascriptreact,yaml setlocal expandtab shiftwidth=2 tabstop=2
|
autocmd FileType html,css,javascript,javascriptreact,yaml setlocal expandtab shiftwidth=2 tabstop=2
|
||||||
|
|
||||||
|
|
||||||
"== Aliases
|
"== Aliases
|
||||||
command! W :w
|
command! W :w
|
||||||
command! Q :q
|
|
||||||
command! Wq :wq
|
|
||||||
command! WQ :wq
|
command! WQ :wq
|
||||||
command! Term :vsplit | vertical resize 45 | terminal
|
command! Wq :wq
|
||||||
command! Wiki :e ~/doc/index.md
|
command! Wiki :e ~/doc/index.md
|
||||||
command! Prettier :!prettier --write %
|
command! Prettier :!prettier --write %
|
||||||
command! ESlint :!eslint %
|
command! ESlint :!eslint %
|
||||||
|
|
@ -90,26 +84,12 @@ command! Black :!black %
|
||||||
command! AutoPep8 :!autopep8 --in-place %
|
command! AutoPep8 :!autopep8 --in-place %
|
||||||
|
|
||||||
|
|
||||||
"== Plug in configuration
|
|
||||||
let g:lightline = {
|
|
||||||
\ 'colorscheme': 'nten16',
|
|
||||||
\ 'active': {
|
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
|
||||||
\ [ 'readonly', 'modified' ] ],
|
|
||||||
\ 'right': [ [ 'lineinfo' ],
|
|
||||||
\ [ 'percent' ],
|
|
||||||
\ [ 'filename', 'filetype' ] ] }
|
|
||||||
\ }
|
|
||||||
|
|
||||||
"== Mapping
|
"== Mapping
|
||||||
let mapleader="'"
|
let mapleader="'"
|
||||||
|
|
||||||
" Alternative keys
|
" Alternative keys
|
||||||
noremap <C-s> :w<CR>
|
noremap <C-s> :w<CR>
|
||||||
noremap <C-n> :tabnew<CR>
|
noremap <C-n> :tabnew<CR>
|
||||||
noremap <C-t> :tabnew<CR>
|
|
||||||
noremap <leader>ww :Wiki<CR>
|
|
||||||
noremap <leader>e :Ve<CR>
|
|
||||||
|
|
||||||
" Window
|
" Window
|
||||||
noremap <C-h> :wincmd h<CR>
|
noremap <C-h> :wincmd h<CR>
|
||||||
|
|
@ -122,7 +102,6 @@ noremap spv :vsp<CR>
|
||||||
noremap sph :sp<CR>
|
noremap sph :sp<CR>
|
||||||
noremap spk :wincmd K<CR>
|
noremap spk :wincmd K<CR>
|
||||||
noremap spl :wincmd L<CR>
|
noremap spl :wincmd L<CR>
|
||||||
noremap spn :wincmd n<CR>
|
|
||||||
|
|
||||||
" Tab
|
" Tab
|
||||||
noremap tn :tabnew<CR>
|
noremap tn :tabnew<CR>
|
||||||
|
|
@ -138,8 +117,8 @@ noremap <A-8> :tabn 8<CR>
|
||||||
noremap <A-9> :tabn 9<CR>
|
noremap <A-9> :tabn 9<CR>
|
||||||
|
|
||||||
" Buffer
|
" Buffer
|
||||||
noremap Bn :bnext<CR>
|
noremap <leader>j :bnext<CR>
|
||||||
noremap Bp :bprev<CR>
|
noremap <leader>k :bprev<CR>
|
||||||
|
|
||||||
" Work with system clipboard
|
" Work with system clipboard
|
||||||
noremap <leader>y "*yy<CR>
|
noremap <leader>y "*yy<CR>
|
||||||
|
|
|
||||||
|
|
@ -70,9 +70,9 @@
|
||||||
<command>kitty -e ranger</command>
|
<command>kitty -e ranger</command>
|
||||||
</action>
|
</action>
|
||||||
</item>
|
</item>
|
||||||
<item label="Thunar">
|
<item label="PCManFM">
|
||||||
<action name="Execute">
|
<action name="Execute">
|
||||||
<command>Thunar</command>
|
<command>pcmanfm</command>
|
||||||
</action>
|
</action>
|
||||||
</item>
|
</item>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
||||||
4
rcrc
4
rcrc
|
|
@ -1,2 +1,2 @@
|
||||||
EXCLUDES="README.md screen.png"
|
EXCLUDES="README.md nten.tar.gz screen.png"
|
||||||
UNDOTTED="bin"
|
UNDOTTED="bin vscode"
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@ bind-key -n End send Escape "OF"
|
||||||
|
|
||||||
|
|
||||||
## Reload config
|
## Reload config
|
||||||
bind r source-file ~/.tmux.conf \; display 'Reloaded tmux config'
|
bind r source-file ~/.tmux.conf \;
|
||||||
|
display 'Reloaded tmux config'
|
||||||
|
|
||||||
## Vim keys for change/resize window
|
## Vim keys for change/resize window
|
||||||
bind -r h select-pane -L
|
bind -r h select-pane -L
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
"editor.tabCompletion": "on",
|
"editor.tabCompletion": "on",
|
||||||
"editor.tabSize": 4,
|
"editor.tabSize": 4,
|
||||||
"editor.formatOnSave": false,
|
"editor.formatOnSave": false,
|
||||||
"files.autoSave": "afterDelay",
|
|
||||||
"workbench.startupEditor": "newUntitledFile",
|
"workbench.startupEditor": "newUntitledFile",
|
||||||
|
|
||||||
// Vim
|
// Vim
|
||||||
|
|
@ -19,13 +18,13 @@
|
||||||
"vim.useSystemClipboard": true,
|
"vim.useSystemClipboard": true,
|
||||||
"vim.insertModeKeyBindings": [
|
"vim.insertModeKeyBindings": [
|
||||||
{"before": ["j", "j"],
|
{"before": ["j", "j"],
|
||||||
"after" : ["<Esc>"]},
|
"after" : ["<Esc>"]},
|
||||||
{"before": ["Ctrl", "Shift", "e"],
|
{"before": ["Ctrl", "Shift", "e"],
|
||||||
"commands": ["workbench.view.explorer"]},
|
"commands": ["workbench.view.explorer"]},
|
||||||
],
|
],
|
||||||
"vim.normalModeKeyBindings": [
|
"vim.normalModeKeyBindings": [
|
||||||
{"before": ["f"],
|
{"before": ["f"],
|
||||||
"after" : ["leader","leader","s"]}
|
"after" : ["leader","leader","s"]}
|
||||||
],
|
],
|
||||||
|
|
||||||
// Terminal
|
// Terminal
|
||||||
|
|
|
||||||
39
zshrc
39
zshrc
|
|
@ -1,46 +1,21 @@
|
||||||
export PATH="$HOME/.yarn/bin:$HOME/bin:$HOME/.application:$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.yarn/bin:$HOME/bin:$HOME/.applications:$HOME/.local/bin:$PATH"
|
||||||
|
|
||||||
### Oh my zsh ###
|
### Oh my zsh
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
ZSH_THEME="simple" # Set theme.
|
ZSH_THEME="simple"
|
||||||
#CASE_SENSITIVE="true" # Use case-sensitive completion.
|
DISABLE_UPDATE_PROMPT="true"
|
||||||
#HYPHEN_INSENSITIVE="true" # Case-sensitive completion must be off.
|
DISABLE_AUTO_TITLE="true"
|
||||||
#DISABLE_AUTO_UPDATE="true" # Disable bi-weekly auto-update checks.
|
|
||||||
DISABLE_UPDATE_PROMPT="true" # Automatically update without prompting.
|
|
||||||
#DISABLE_MAGIC_FUNCTIONS="true" # If pasting URL and other text is messed up.
|
|
||||||
#DISABLE_LS_COLORS="true" # Disable colors in ls.
|
|
||||||
DISABLE_AUTO_TITLE="true" # Disable auto-setting terminal title.
|
|
||||||
#ENABLE_CORRECTION="true" # Enable command auto-correction.
|
|
||||||
#COMPLETION_WAITING_DOTS="true" # Display red dots whilst waiting for completion.
|
|
||||||
export UPDATE_ZSH_DAYS=7 # Change how often to auto-update.
|
|
||||||
|
|
||||||
plugins=(yarn nvm)
|
plugins=(yarn nvm)
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
### Variables
|
|
||||||
export EDITOR="nvim"
|
|
||||||
export VISUAL="nvim"
|
|
||||||
|
|
||||||
### Functions
|
|
||||||
bgcolor() {
|
|
||||||
convert -size 1x1 xc:"#$1" /tmp/bgc.png
|
|
||||||
feh --bg-tile /tmp/bgc.png
|
|
||||||
}
|
|
||||||
backup() {
|
|
||||||
cp $1 $1.bak
|
|
||||||
}
|
|
||||||
|
|
||||||
### Aliases
|
### Aliases
|
||||||
alias cls="clear"
|
alias cls="clear"
|
||||||
alias mkdir="mkdir -p"
|
alias mkdir="mkdir -p"
|
||||||
alias cp="cp -r"
|
alias cp="cp -r"
|
||||||
alias du="du -sh"
|
alias du="du -h"
|
||||||
alias vim="nvim"
|
alias vim="nvim"
|
||||||
alias vi="vim"
|
alias vi="vim"
|
||||||
alias tl="tmuxp load"
|
alias rgf="rg --files|rg"
|
||||||
alias d="docker"
|
|
||||||
alias wiki="vi +Wiki"
|
|
||||||
alias tmux="tmux -2"
|
alias tmux="tmux -2"
|
||||||
alias :q="exit"
|
alias :q="exit"
|
||||||
alias ..="cd .."
|
|
||||||
alias ...="cd ../.."
|
alias ...="cd ../.."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue