DuckDuckWhale
c772724cac
Add: - Rust and Helix install/configure scripts - tmux curly underline with colors - Rocky SSH & Mosh setup - `asciinema` and `rg` - Mosh PPA for old Ubuntu systems - VirtualBox USB devices group - Add `~/.local/bin/` to path in .bashrc Update: - Use `~/.bash_login` instead of `~/.profile` for tmux on login and exec it - Rename `gnome-todo` to `endeavour` - Use new sshd alias - Reload instead of restarting sshd Remove: - Vim colorschemes and plugins - `.sh` extensions on executable scripts
80 lines
2.0 KiB
VimL
80 lines
2.0 KiB
VimL
filetype plugin indent on
|
|
syntax on
|
|
|
|
autocmd CmdwinEnter * noremap <buffer> <CR> <CR>
|
|
autocmd FileType rust,c,cpp,java,python,sh,tex set noexpandtab colorcolumn=101 textwidth=100
|
|
autocmd FileType markdown set noexpandtab colorcolumn=81 textwidth=80
|
|
autocmd FileType markdown,tex set ai spell
|
|
|
|
set encoding=utf-8
|
|
set termencoding=utf-8
|
|
set fileencodings=ucs-bom,utf-8,chinese
|
|
|
|
let mapleader=" "
|
|
nnoremap <space> <nop>
|
|
nnoremap Y y$
|
|
nnoremap <CR> :
|
|
vnoremap <CR> :
|
|
|
|
nnoremap <silent> <leader>f 1z=
|
|
nnoremap <silent> <leader>h :noh<CR>:echo "Stopped search highlighting."<CR>
|
|
nnoremap <silent> <leader>i :call ToggleIntuitiveLineMovement()<CR>
|
|
nnoremap <silent> <leader>l :set list!<CR>
|
|
nnoremap <silent> <leader>q gwap
|
|
nnoremap <silent> <leader>r :set relativenumber!<CR>
|
|
nnoremap <silent> <leader>s :call ToggleSpellCheck()<CR>
|
|
nnoremap <silent> <leader>w :update<CR>
|
|
|
|
set backspace=indent,eol,start " powerful backspace
|
|
set complete+=kspell " dictionary completion
|
|
set cpo+=J " sentences are separated by two spaces
|
|
set display=lastline " show as much as possible when it doesn't fit
|
|
set hlsearch
|
|
set incsearch
|
|
set listchars=eol:$,tab:>-,trail:·
|
|
set mouse=a
|
|
set number
|
|
set relativenumber
|
|
set showcmd
|
|
set spelllang=en_us,cjk
|
|
|
|
hi Normal ctermfg=white ctermbg=none
|
|
hi Search ctermfg=yellow ctermbg=black
|
|
hi IncSearch ctermfg=black ctermbg=yellow
|
|
hi LineNr ctermfg=10 ctermbg=0
|
|
hi CursorLineNr ctermfg=12 ctermbg=0
|
|
hi Visual ctermfg=16 ctermbg=yellow
|
|
|
|
hi Pmenu ctermfg=NONE ctermbg=236
|
|
hi PmenuSel ctermfg=0 ctermbg=10
|
|
|
|
set tabstop=4
|
|
set shiftwidth=4
|
|
|
|
set timeout ttimeoutlen=25
|
|
|
|
function! ToggleSpellCheck()
|
|
set spell!
|
|
if &spell
|
|
echo "Spell check is now on."
|
|
else
|
|
echo "Spell check is now off."
|
|
endif
|
|
endfunction
|
|
|
|
function! ToggleIntuitiveLineMovement()
|
|
if mapcheck("jk")==""
|
|
echo "Intuitive line movement is now on."
|
|
nnoremap j gj
|
|
nnoremap k gk
|
|
inoremap <down> <C-o>gj
|
|
inoremap <up> <C-o>gk
|
|
else
|
|
echo "Intuitive line movement is now off."
|
|
nunmap j
|
|
nunmap k
|
|
iunmap <down>
|
|
iunmap <up>
|
|
endif
|
|
endfunction
|