Some changes
- Change style of prompt in tcsh - Add alias for loading vim session to .tcshrc, add mappings for it to init.vimmaster
parent
f66fde3761
commit
8a5241b605
|
@ -1,3 +1,25 @@
|
||||||
|
" Plugins
|
||||||
|
call plug#begin()
|
||||||
|
Plug 'catppuccin/nvim', { 'as': 'catppuccin' }
|
||||||
|
" Status & tab bars
|
||||||
|
Plug 'itchyny/lightline.vim'
|
||||||
|
" Automaticly create closing bracket
|
||||||
|
Plug 'windwp/nvim-autopairs'
|
||||||
|
" Plugin for comfortable navigating
|
||||||
|
Plug 'preservim/nerdtree'
|
||||||
|
" Plugin for surround text in something faster
|
||||||
|
Plug 'kylechui/nvim-surround'
|
||||||
|
" Plugin for snippets
|
||||||
|
Plug 'dcampos/nvim-snippy'
|
||||||
|
" Plugin for git integration
|
||||||
|
Plug 'tpope/vim-fugitive'
|
||||||
|
call plug#end()
|
||||||
|
|
||||||
|
autocmd VimEnter *
|
||||||
|
\ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
||||||
|
\| PlugInstall --sync | q
|
||||||
|
\| endif
|
||||||
|
|
||||||
" Set variables
|
" Set variables
|
||||||
set number
|
set number
|
||||||
set relativenumber
|
set relativenumber
|
||||||
|
@ -30,28 +52,6 @@ let g:lightline = {
|
||||||
\ },
|
\ },
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
" Plugins
|
|
||||||
call plug#begin()
|
|
||||||
Plug 'catppuccin/nvim', { 'as': 'catppuccin' }
|
|
||||||
" Status & tab bars
|
|
||||||
Plug 'itchyny/lightline.vim'
|
|
||||||
" Automaticly create closing bracket
|
|
||||||
Plug 'windwp/nvim-autopairs'
|
|
||||||
" Plugin for comfortable navigating
|
|
||||||
Plug 'preservim/nerdtree'
|
|
||||||
" Plugin for surround text in something faster
|
|
||||||
Plug 'kylechui/nvim-surround'
|
|
||||||
" Plugin for snippets
|
|
||||||
Plug 'dcampos/nvim-snippy'
|
|
||||||
" Plugin for git integration
|
|
||||||
Plug 'tpope/vim-fugitive'
|
|
||||||
call plug#end()
|
|
||||||
|
|
||||||
autocmd VimEnter *
|
|
||||||
\ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
|
||||||
\| PlugInstall --sync | q
|
|
||||||
\| endif
|
|
||||||
|
|
||||||
autocmd TermOpen * setlocal nonumber norelativenumber
|
autocmd TermOpen * setlocal nonumber norelativenumber
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,6 +75,9 @@ nmap <silent> <c-l> :vertical resize +5<CR>
|
||||||
nmap <silent> <Leader>n :nohlsearch<CR>
|
nmap <silent> <Leader>n :nohlsearch<CR>
|
||||||
" Saving time to not write ":Git "
|
" Saving time to not write ":Git "
|
||||||
nmap <Leader>g :Git
|
nmap <Leader>g :Git
|
||||||
|
nmap <silent> <Leader>q :enew<bar>bd #<CR>
|
||||||
|
nmap <silent> <Leader>v :vsplit<CR>
|
||||||
|
nmap <silent> <Leader>s :split<CR>
|
||||||
|
|
||||||
" Terminal
|
" Terminal
|
||||||
nnoremap <silent> <Leader>t :terminal<CR>i
|
nnoremap <silent> <Leader>t :terminal<CR>i
|
||||||
|
@ -91,6 +94,11 @@ xmap <Tab> <Plug>(snippy-cut-text)
|
||||||
nmap <silent> zj o<Esc>k
|
nmap <silent> zj o<Esc>k
|
||||||
nmap <silent> zk O<Esc>j
|
nmap <silent> zk O<Esc>j
|
||||||
|
|
||||||
|
" Sessions
|
||||||
|
nmap <Leader>z :mksession!<CR>
|
||||||
|
nmap <Leader>x :source Session.vim<CR>
|
||||||
|
nmap <Leader>e :mksession! <bar> :wqa<CR>
|
||||||
|
|
||||||
|
|
||||||
" Setupping
|
" Setupping
|
||||||
colorscheme catppuccin-frappe
|
colorscheme catppuccin-frappe
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
set __prompt_key_color="${__host_color}"
|
set __prompt_key_color="${__host_color}"
|
||||||
if (! $__last_code == 0) set __prompt_key_color="%{\033[38;2;231;130;132m%}"
|
if (! $__last_code == 0) set __prompt_key_color="%{\033[38;2;231;130;132m%}"
|
||||||
set prompt="${__host_color}%n@%m ${__git_color}`__git_current_branch`${__path_color}%~ ${__prompt_key_color}${__prompt_key}${__reset_color}${__reset_cursor} "
|
set prompt="${__host_color}%n@%m ${__git_color}`__git_current_branch`${__path_color}%C ${__prompt_key_color}${__prompt_key}${__reset_color}${__reset_cursor} "
|
||||||
|
|
10
tcsh/.tcshrc
10
tcsh/.tcshrc
|
@ -1,14 +1,17 @@
|
||||||
|
set SHELL="`which tcsh`"
|
||||||
if ($?prompt) then
|
if ($?prompt) then
|
||||||
|
set complete=enhance
|
||||||
|
|
||||||
set __prompt_key='$'
|
set __prompt_key='$'
|
||||||
if ($USER == "root") set __prompt_key='#'
|
if ($USER == "root") set __prompt_key='#'
|
||||||
|
|
||||||
alias __git_current_branch 'git rev-parse --abbrev-ref HEAD >& /dev/null && echo "(`git rev-parse --abbrev-ref HEAD`) "'
|
alias __git_current_branch 'git rev-parse --abbrev-ref HEAD >& /dev/null && echo "(`git rev-parse --abbrev-ref HEAD`) "'
|
||||||
|
|
||||||
set __reset_cursor="%{\e[3 q%}"
|
set __reset_cursor="%{\e[3 q%}"
|
||||||
set __host_color="%{\033[38;2;140;170;238m%}"
|
|
||||||
set __git_color="%{\033[38;2;131;139;167m%}"
|
|
||||||
set __path_color="%{\033[38;2;202;158;230m%}"
|
|
||||||
set __reset_color="%{\033[0m%}"
|
set __reset_color="%{\033[0m%}"
|
||||||
|
set __host_color="${__reset_color}%{\033[38;2;140;170;238m%}"
|
||||||
|
set __git_color="${__reset_color}%{\033[38;2;131;139;167m%}"
|
||||||
|
set __path_color="${__reset_color}%{\033[1m%}%{\033[38;2;202;158;230m%}"
|
||||||
|
|
||||||
alias precmd 'set __last_code=$?; source ~/.precmd.tcsh'
|
alias precmd 'set __last_code=$?; source ~/.precmd.tcsh'
|
||||||
endif
|
endif
|
||||||
|
@ -25,3 +28,4 @@ alias stdn "doas shutdown -ah 0"
|
||||||
alias rbot "doas reboot"
|
alias rbot "doas reboot"
|
||||||
alias dv "doas nvim"
|
alias dv "doas nvim"
|
||||||
alias vi "nvim"
|
alias vi "nvim"
|
||||||
|
alias vis "nvim -S Session.vim"
|
||||||
|
|
Loading…
Reference in New Issue