From df2105166b6a8a45f521fb22e7f0c4d2cd4f1c72 Mon Sep 17 00:00:00 2001 From: pryazha Date: Wed, 19 Feb 2025 22:50:00 +0500 Subject: clean bash profile, change vim/nvim configs and add some scripts --- .config/.bashrc | 8 +++----- .config/.vimrc | 48 +++++++++++++++++++++++++++----------------- .config/nvim/init.vim | 55 +++++++++++++++++++++++++++++++-------------------- 3 files changed, 67 insertions(+), 44 deletions(-) (limited to '.config') diff --git a/.config/.bashrc b/.config/.bashrc index 6ca0e5c..b5407dc 100644 --- a/.config/.bashrc +++ b/.config/.bashrc @@ -1,10 +1,8 @@ -# .bashrc - # If not running interactively, don't do anything [[ $- != *i* ]] && return alias ls='ls --color=auto' -alias ll='ls -lh' +alias lt='ls -t' alias l='ls -lha' PURPLE="\[$(tput setaf 5)\]" @@ -13,12 +11,12 @@ RESET="\[$(tput sgr0)\]" PS1="[\u@${PURPLE}\h${RESET} \w]\n> " PS2=">> " -# export XDG_RUNTIME_DIR=/run/user/$(id -u) - if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi +PATH="$HOME/dotfiles/scripts:$PATH" + if [[ -z $DISPLAY ]] && [[ $(tty) = "/dev/tty1" ]]; then exec startx &> /dev/null fi diff --git a/.config/.vimrc b/.config/.vimrc index 573c6b7..55f9908 100644 --- a/.config/.vimrc +++ b/.config/.vimrc @@ -13,28 +13,40 @@ call plug#end() set termguicolors colorscheme hatsunemiku +"set shiftwidth=4 +"set smarttab +"set expandtab +"set tabstop=4 +"set softtabstop=0 + +set tabstop=8 +set shiftwidth=8 +set softtabstop=8 +set textwidth=80 +set noexpandtab + set nowrap set cindent -set cinoptions=(,{,!,l1 - -set shiftwidth=4 smarttab -set expandtab -set tabstop=4 softtabstop=0 +"set cinoptions=(,{,!,l1 +set cinoptions=:0,l1,t0,g0,(0 let g:netrw_banner=0 set makeprg=./build.sh -map \ve :vswincmd lEx -map \t :vertical rightbelow terminal -map \m :make!:vertical rightbelow copen:wincmd = -map \n :cnext -map \c :cd %:p:h -map \q :q -map \b :buffer -map \bn :bn -map \bp :bp -map \bd :bd - -map \y "+y -map \p "+p +let mapleader="," + +map e :Ex +map ve :vswincmd lEx +map t :vertical rightbelow terminal +map m :make!:vertical rightbelow copen:wincmd = +map n :cnext +map z :cd %:p:h +map q :q +map b :buffers:b + +map y "+y +map p "+p + +map cm I/*A*/0 +map cd ^dwA0 diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 197c15a..6af4444 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -1,34 +1,47 @@ -colorscheme retrobox -set termguicolors +let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' +if empty(glob(data_dir . '/autoload/plug.vim')) + silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC +endif -set nowrap +call plug#begin() +Plug '4513ECHO/vim-colors-hatsunemiku' +call plug#end() + +set termguicolors +colorscheme hatsunemiku set incsearch set nohlsearch set clipboard+=unnamedplus -set cindent -set cinoptions=(,{,!,l1 +set tabstop=8 +set shiftwidth=8 +set softtabstop=8 +set textwidth=80 +set noexpandtab -set shiftwidth=4 smarttab -set expandtab -set tabstop=4 softtabstop=0 +set nowrap +set cindent +set cinoptions=:0,l1,t0,g0,(0 let g:netrw_banner=0 set makeprg=./build.sh -map \e :Ex -map \ve :vswincmd lEx -map \t :vertical rightbelow terminal -map \m :make!:vertical rightbelow copen:wincmd = -map \n :cnext -map \c :cd %:p:h -map \q :q -map \b :buffer -map \bn :bn -map \bp :bp -map \bd :bd -map \p :let @+ = expand("%") -map \fp :let @+ = expand("%:p") +let mapleader="," + +map e :Ex +map ve :vswincmd lEx +map t :vertical rightbelow terminal +map m :make!:vertical rightbelow copen:wincmd = +map n :cnext +map z :cd %:p:h +map q :q +map b :buffers:b +map p :let @+ = expand("%") +map fp :let @+ = expand("%:p") + +map cm I/*A*/0 +map cd ^dwA0 -- cgit v1.2.3