update to nixos version
This commit is contained in:
@@ -1,77 +1,71 @@
|
|||||||
if ($TERM=~"xterm-256color" || $TERM=~"screen-256color") || exists('g:GtkGuiLoaded')
|
call plug#begin('~/.config/nvim/plugins')
|
||||||
call plug#begin('~/.config/nvim/plugins')
|
Plug 'cloudhead/neovim-fuzzy'
|
||||||
Plug 'cloudhead/neovim-fuzzy'
|
Plug 'mhinz/vim-signify'
|
||||||
Plug 'mhinz/vim-signify'
|
Plug 'overcache/NeoSolarized'
|
||||||
Plug 'overcache/NeoSolarized'
|
Plug 'LnL7/vim-nix'
|
||||||
Plug 'LnL7/vim-nix'
|
Plug 'neovimhaskell/haskell-vim'
|
||||||
Plug 'neovimhaskell/haskell-vim'
|
call plug#end()
|
||||||
call plug#end()
|
|
||||||
|
|
||||||
|
if ($TERM=~"xterm-256color" || $TERM=~"screen-256color")
|
||||||
colorscheme NeoSolarized
|
colorscheme NeoSolarized
|
||||||
set background=light
|
set background=light
|
||||||
set termguicolors
|
set termguicolors
|
||||||
|
|
||||||
" https://github.com/cloudhead/neovim-fuzzy/issues/50
|
|
||||||
let g:fuzzy_rootcmds = [["git", "rev-parse", "--show-toplevel"]]
|
|
||||||
|
|
||||||
map <silent> <C-P> :FuzzyOpen<CR>
|
|
||||||
|
|
||||||
if exists('g:GtkGuiLoaded')
|
|
||||||
call rpcnotify(1, 'Gui', 'Font', 'Fantasque Sans Mono 13')
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
|
" https://github.com/cloudhead/neovim-fuzzy/issues/50
|
||||||
|
let g:fuzzy_rootcmds = [["git", "rev-parse", "--show-toplevel"]]
|
||||||
|
|
||||||
let g:markdown_fenced_languages = ['python', 'bash=sh', 'go', 'c', 'cpp', 'yaml', 'json', 'sql', 'haskell']
|
let g:markdown_fenced_languages = ['python', 'bash=sh', 'go', 'c', 'cpp', 'yaml', 'json', 'sql', 'haskell']
|
||||||
|
|
||||||
set autoindent
|
|
||||||
set autoread
|
|
||||||
set autowrite
|
set autowrite
|
||||||
set expandtab
|
set expandtab
|
||||||
set hidden
|
|
||||||
set ignorecase
|
set ignorecase
|
||||||
set incsearch
|
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
set linebreak
|
set linebreak
|
||||||
set list listchars=tab:▸\ ,trail:·
|
set list listchars=tab:▸\ ,trail:·
|
||||||
set mouse=a
|
set mouse=a
|
||||||
set nofoldenable
|
set nofoldenable
|
||||||
set nojoinspaces
|
set nojoinspaces
|
||||||
|
set nowrap
|
||||||
set number
|
set number
|
||||||
set path+=**
|
|
||||||
set printoptions=paper:A4,syntax:n,number:y
|
set printoptions=paper:A4,syntax:n,number:y
|
||||||
set shiftwidth=4
|
set shiftwidth=2
|
||||||
set showbreak=↪\
|
set showbreak=↪\
|
||||||
set splitbelow
|
set splitbelow
|
||||||
set splitright
|
set splitright
|
||||||
set statusline=\(%n\)\ %<%.99f\ %y\ %w%m%r%=%-14.(%l,%c%V%)\ %P
|
set statusline=\(%n\)\ %<%.99f\ %y\ %w%m%r%=%-14.(%l,%c%V%)\ %P
|
||||||
set tabstop=4
|
|
||||||
set textwidth=120
|
set textwidth=120
|
||||||
set wrapscan
|
set wrapscan
|
||||||
|
|
||||||
let mapleader=" "
|
let mapleader=" "
|
||||||
let maplocalleader=" "
|
let maplocalleader=" "
|
||||||
|
|
||||||
|
map <silent> <C-i> <NOP>
|
||||||
|
map <silent> <C-o> :FuzzyOpen<CR>
|
||||||
|
map <silent> <C-_> :FuzzyGrep<CR>
|
||||||
|
|
||||||
nnoremap <silent> <esc><esc> :nohls<CR>
|
nnoremap <silent> <esc><esc> :nohls<CR>
|
||||||
|
|
||||||
nnoremap <silent> gB :bp<CR>
|
nnoremap <silent> gB :bp<CR>
|
||||||
nnoremap <silent> gb :bn<CR>
|
nnoremap <silent> gb :bn<CR>
|
||||||
|
|
||||||
"noremap p p`[
|
|
||||||
"noremap P P`[
|
|
||||||
|
|
||||||
" https://github.com/neovim/neovim/pull/13268
|
" https://github.com/neovim/neovim/pull/13268
|
||||||
unmap Y
|
if matchstr(execute('version'), 'NVIM v0.\zs[^\n]') > 5
|
||||||
|
unmap Y
|
||||||
|
endif
|
||||||
|
|
||||||
|
function! s:StripTrailing()
|
||||||
|
let l = line(".")
|
||||||
|
let c = col(".")
|
||||||
|
%s/\s\+$//e
|
||||||
|
call cursor(l, c)
|
||||||
|
endfunction
|
||||||
|
|
||||||
augroup vimrc
|
augroup vimrc
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd BufNewFile,BufRead *.pdc,*.pandoc setlocal filetype=markdown
|
autocmd BufWritePre * call s:StripTrailing()
|
||||||
autocmd BufNewFile,BufRead Vagrantfile setlocal filetype=ruby
|
autocmd BufNewFile,BufRead *.pdc,*.pandoc setlocal filetype=markdown
|
||||||
autocmd FileType puppet setlocal tw=140
|
autocmd FileType go setlocal noexpandtab sw=8
|
||||||
autocmd FileType bash,zsh,sh,ruby,yaml setlocal sw=2
|
|
||||||
autocmd FileType go setlocal noexpandtab sw=8 ts=8
|
|
||||||
|
|
||||||
" restore cursor
|
|
||||||
"autocmd VimLeave * set guicursor=a:ver90
|
|
||||||
augroup END
|
augroup END
|
||||||
|
|||||||
31
zsh/.zshrc
31
zsh/.zshrc
@@ -1,4 +1,3 @@
|
|||||||
autoload -U +X colors && colors
|
|
||||||
autoload -U +X compinit && compinit
|
autoload -U +X compinit && compinit
|
||||||
autoload -U +X bashcompinit && bashcompinit
|
autoload -U +X bashcompinit && bashcompinit
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info
|
||||||
@@ -18,6 +17,7 @@ setopt append_history
|
|||||||
setopt extended_history
|
setopt extended_history
|
||||||
setopt histignorealldups
|
setopt histignorealldups
|
||||||
setopt histignorespace
|
setopt histignorespace
|
||||||
|
setopt histfcntllock
|
||||||
|
|
||||||
bindkey -e
|
bindkey -e
|
||||||
|
|
||||||
@@ -46,27 +46,34 @@ zstyle ':completion:*' use-cache yes
|
|||||||
zstyle ':completion:*' menu select=2
|
zstyle ':completion:*' menu select=2
|
||||||
|
|
||||||
zstyle ':vcs_info:*' enable git
|
zstyle ':vcs_info:*' enable git
|
||||||
zstyle ':vcs_info:*' formats "[%{$fg_bold[cyan]%}%b%{$reset_color%}]"
|
zstyle ':vcs_info:*' check-for-changes true
|
||||||
zstyle ':vcs_info:*' actionformats "[%{$fg_bold[cyan]%}%b%{$reset_color%}|%a]"
|
zstyle ':vcs_info:*' formats "[%B%F{cyan}%b%f%%b]"
|
||||||
|
zstyle ':vcs_info:*' actionformats "[%B%F{cyan}%b%f%%b|%a]"
|
||||||
|
|
||||||
# cut shown $PWD if depth is 4 or more ('~' counts)
|
local shell_indicator=""
|
||||||
truncated_pwd="%(4~|.../%2~|%~)"
|
|
||||||
# cut shown $PWD after 20 characters
|
|
||||||
#truncated_pwd="%20<...<%~%<<"
|
|
||||||
|
|
||||||
shell_indicator=""
|
|
||||||
[[ -f /run/.containerenv && -f /run/.toolboxenv ]] && shell_indicator="%F{13}⬢%f "
|
[[ -f /run/.containerenv && -f /run/.toolboxenv ]] && shell_indicator="%F{13}⬢%f "
|
||||||
|
|
||||||
PROMPT="${shell_indicator}(%M) ${truncated_pwd} %{$fg[red]%}%(#~#~$)%{$reset_color%} "
|
local user_color="red"
|
||||||
|
let $UID && user_color="13"
|
||||||
|
|
||||||
|
local user="%B%F{${user_color}}%n%f%b"
|
||||||
|
local at="@"
|
||||||
|
local host="%B%m%b "
|
||||||
|
local dollar="%F{red}%(#~#~$)%f "
|
||||||
|
local percent="%# "
|
||||||
|
local rc="%B%F{red}%(?..%? )%f%b"
|
||||||
|
local dir="%(4~|.../%2~|%~) "
|
||||||
|
|
||||||
|
PROMPT="${shell_indicator}${user}${at}${host}${dir}${dollar}"
|
||||||
RPROMPT="\$vcs_info_msg_0_"
|
RPROMPT="\$vcs_info_msg_0_"
|
||||||
|
|
||||||
precmd () {
|
precmd () {
|
||||||
print -Pn "\e]0;(%M) %~\a"
|
print -Pn "\e]0;%n@%m: %~\a"
|
||||||
vcs_info
|
vcs_info
|
||||||
}
|
}
|
||||||
|
|
||||||
preexec () {
|
preexec () {
|
||||||
print -Pn "\e]0;(%M) $1\a"
|
print -Pn "\e]0;%n@%m: $1\a"
|
||||||
}
|
}
|
||||||
|
|
||||||
sshl() {
|
sshl() {
|
||||||
|
|||||||
Reference in New Issue
Block a user