summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/vim/vimrc85
-rw-r--r--.config/zsh/.zprofile1
-rw-r--r--.config/zsh/.zshrc2
3 files changed, 87 insertions, 1 deletions
diff --git a/.config/vim/vimrc b/.config/vim/vimrc
new file mode 100644
index 0000000..ba20715
--- /dev/null
+++ b/.config/vim/vimrc
@@ -0,0 +1,85 @@
+set runtimepath^=$XDG_CONFIG_HOME/vim
+set runtimepath+=$XDG_DATA_HOME/vim
+set runtimepath+=$XDG_CONFIG_HOME/vim/after
+
+set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim
+set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after
+
+let g:netrw_home = $XDG_DATA_HOME."/vim"
+call mkdir($XDG_DATA_HOME."/vim/spell", 'p')
+set viewdir=$XDG_DATA_HOME/vim/view | call mkdir(&viewdir, 'p')
+
+set viminfofile=$XDG_CACHE_HOME/vim/viminfo
+set backupdir=$XDG_CACHE_HOME/vim/backup | call mkdir(&backupdir, 'p')
+set directory=$XDG_CACHE_HOME/vim/swap | call mkdir(&directory, 'p')
+set undodir=$XDG_CACHE_HOME/vim/undo | call mkdir(&undodir, 'p')
+set undofile
+
+call plug#begin('~/.config/vim/plugged')
+ Plug 'romgrk/doom-one.vim'
+ Plug 'tpope/vim-surround'
+ Plug 'tpope/vim-commentary'
+call plug#end()
+
+filetype indent plugin on
+syntax enable
+set mouse=a
+set termguicolors
+set nocompatible
+set hidden
+set wildmenu
+set wildignorecase
+set fileignorecase
+set showcmd
+set hlsearch
+set incsearch
+set ignorecase
+set smartcase
+set backspace=indent,eol,start
+set autoindent
+set ruler
+set confirm
+set visualbell
+set number relativenumber
+set notimeout ttimeout ttimeoutlen=200
+set pastetoggle=<F11>
+set shiftwidth=4
+set softtabstop=4
+set expandtab
+set noswapfile
+set nowrap
+set background=dark
+set cursorline
+set splitright
+set splitbelow
+
+map Y y$
+nnoremap <C-L> :nohl<CR><C-L>
+nnoremap n nzzzv
+nnoremap N Nzzzv
+" inoremap kj <Esc>
+tnoremap kj <C-\><C-n>
+
+inoremap , ,<c-g>u
+inoremap . .<c-g>u
+inoremap [ [<c-g>u
+inoremap ! !<c-g>u
+inoremap ? ?<c-g>u
+
+vnoremap J :m '>+1<CR>gv=gv
+vnoremap K :m '<-2<CR>gv=gv
+
+let mapleader=" "
+nnoremap <leader>h :wincmd h<CR>
+nnoremap <leader>j :wincmd j<CR>
+nnoremap <leader>k :wincmd k<CR>
+nnoremap <leader>l :wincmd l<CR>
+nnoremap <leader><left> :wincmd h<CR>
+nnoremap <leader><down> :wincmd j<CR>
+nnoremap <leader><up> :wincmd k<CR>
+nnoremap <leader><right> :wincmd l<CR>
+
+let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
+let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
+colorscheme doom-one
+highlight CursorLineNr cterm=bold ctermbg=Black ctermfg=Blue
diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile
index 94b00d6..9ec11f6 100644
--- a/.config/zsh/.zprofile
+++ b/.config/zsh/.zprofile
@@ -24,6 +24,7 @@ export CM_SELECTIONS=clipboard
export CM_DIR=/tmp
export PF_INFO="ascii title os kernel uptime pkgs memory"
export QT_QPA_PLATFORMTHEME=qt5ct
+export VIMINIT='let $MYVIMRC = !has("nvim") ? "$XDG_CONFIG_HOME/vim/vimrc" : "$XDG_CONFIG_HOME/nvim/init.lua" | so $MYVIMRC'
export LESS_TERMCAP_mb=$'\E[1;31m'
export LESS_TERMCAP_md=$'\E[1;31m'
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
index e43d2d9..4dd7d88 100644
--- a/.config/zsh/.zshrc
+++ b/.config/zsh/.zshrc
@@ -41,7 +41,7 @@ alias cs='config status'
alias clg="config log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(cyan)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"
alias zshrc='vim $XDG_CONFIG_HOME/zsh/.zshrc'
-alias vimrc='vim ~/.vim/vimrc'
+alias vimrc='vim $XDG_CONFIG_HOME/vim/vimrc'
alias nvimrc='cd $XDG_CONFIG_HOME/nvim;nvim'
alias i3config='vim $XDG_CONFIG_HOME/i3/config'
alias startup='vim $XDG_CONFIG_HOME/i3/init'