[nvim] Reorder, add more arrows
This commit is contained in:
parent
1e21896889
commit
5d110071bc
1 changed files with 44 additions and 24 deletions
|
@ -7,27 +7,22 @@ let mapleader=';' " set <leader>
|
|||
syntax enable
|
||||
|
||||
set mouse=a " enable mouse selection
|
||||
set number " line numbers on the left side
|
||||
set relativenumber " number+relativenumber = relative numbers for all but current line
|
||||
set showcmd " show the commands while typing
|
||||
set splitright " open new splits on the right
|
||||
set splitbelow " open new splits below
|
||||
set autoread " autoreload file on change
|
||||
set scrolloff=4 " keep the cursor 4 lines away from the top/bottom
|
||||
set ruler " show the lines/% bottomright
|
||||
set encoding=utf-8 " set default encoding
|
||||
set showcmd " show the commands while typing
|
||||
set laststatus=2 " always show the status line
|
||||
set encoding=utf-8 " set default encoding
|
||||
set autoread " autoreload file on change
|
||||
|
||||
set conceallevel=0 " don't use conceals, seriously
|
||||
let g:tex_conceal='' " I said no conceals
|
||||
|
||||
set shell=/bin/zsh " use zsh instead of bash
|
||||
|
||||
" use the nice `par` program wrap lines at 99 characters
|
||||
set formatprg=par\ -w99
|
||||
set formatoptions=tcrqnlmj
|
||||
set textwidth=99
|
||||
|
||||
set number " line numbers on the left side
|
||||
set relativenumber " number+relativenumber = relative numbers for all but current line
|
||||
" toggle hybrid relative numbers when entering/leaving insert mode
|
||||
":augroup numbertoggle
|
||||
": autocmd!
|
||||
|
@ -35,18 +30,15 @@ set textwidth=99
|
|||
": autocmd InsertEnter * set norelativenumber
|
||||
":augroup END
|
||||
|
||||
" change cursor shape according to mode
|
||||
:let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
|
||||
" use the nice `par` program to wrap lines at 99 characters
|
||||
" TODO pass the current textwidth to par?
|
||||
"set formatprg=par\ -w99
|
||||
set formatoptions=tcrqnlmj
|
||||
set textwidth=99
|
||||
|
||||
set ignorecase smartcase " don't match case if typing in all-lowercase
|
||||
|
||||
" ignore motion for < >
|
||||
nnoremap < <<
|
||||
nnoremap > >>
|
||||
" make < > shifts keep selection
|
||||
vnoremap < <gv
|
||||
vnoremap > >gv
|
||||
|
||||
" Ctrl+Backspace deletes previous word like in most text editors
|
||||
inoremap <esc>dba<bs>
|
||||
|
||||
" Switching buffers {{{2
|
||||
|
@ -62,6 +54,13 @@ set noexpandtab " tab key puts tabs
|
|||
" trailing whitespace looks like \cdot
|
||||
set list listchars=tab:¦\ ,trail:· " show indentation lines for tabs, trailing whitespace looks like \cdot
|
||||
|
||||
" Ignore motion for < >
|
||||
nnoremap < <<
|
||||
nnoremap > >>
|
||||
" Make < > shifts keep selection
|
||||
vnoremap < <gv
|
||||
vnoremap > >gv
|
||||
|
||||
" Folds {{{2
|
||||
|
||||
set foldlevelstart=3 " Not too much folding
|
||||
|
@ -71,6 +70,9 @@ vnoremap <Space> zf
|
|||
|
||||
" Misc {{{2
|
||||
|
||||
" Change cursor shape according to mode
|
||||
:let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
|
||||
|
||||
" Escape from NeoVim terminals
|
||||
tnoremap <Esc> <C-\><C-n>
|
||||
" Just hit the [à0] button on an AZERTY, no need to do shift+à to for 0
|
||||
|
@ -118,10 +120,28 @@ nnoremap <silent> <C-w>V :let spr=&spr<BAR>set nospr<BAR>vnew<BAR>let &spr=spr<C
|
|||
nnoremap <silent> <C-w>N :let spr=&spr<BAR>set nospr<BAR>new<BAR>let &spr=spr<CR>
|
||||
|
||||
" Cool arrows {{{2
|
||||
inoremap <leader>arse ↘
|
||||
inoremap <leader>arsw ↙
|
||||
inoremap <leader>arne ↗
|
||||
inoremap <leader>arnw ↖
|
||||
inoremap <leader>akl ↗ | inoremap <leader>alk ↗
|
||||
inoremap <leader>ajl ↘ | inoremap <leader>alj ↘
|
||||
inoremap <leader>ajh ↙ | inoremap <leader>ahj ↙
|
||||
inoremap <leader>akh ↖ | inoremap <leader>ahk ↖
|
||||
inoremap <leader>ajk ↕ | inoremap <leader>akj ↕
|
||||
inoremap <leader>ahl ↔ | inoremap <leader>alh ↔
|
||||
|
||||
inoremap <leader>dah ⇠
|
||||
inoremap <leader>daj ⇣
|
||||
inoremap <leader>dak ⇡
|
||||
inoremap <leader>dal ⇢
|
||||
|
||||
inoremap <leader>aahh ⇐
|
||||
inoremap <leader>aajj ⇓
|
||||
inoremap <leader>aakk ⇑
|
||||
inoremap <leader>aall ⇒
|
||||
inoremap <leader>aakl ⇗ | inoremap <leader>aalk ⇗
|
||||
inoremap <leader>aajl ⇘ | inoremap <leader>aalj ⇘
|
||||
inoremap <leader>aajh ⇙ | inoremap <leader>aahj ⇙
|
||||
inoremap <leader>aakh ⇖ | inoremap <leader>aahk ⇖
|
||||
inoremap <leader>aajk ⇕ | inoremap <leader>aakj ⇕
|
||||
inoremap <leader>aahl ⇔ | inoremap <leader>aalh ⇔
|
||||
|
||||
" Default visual block {{{2
|
||||
nnoremap v <C-v>
|
||||
|
@ -229,7 +249,7 @@ let g:haskell_enable_static_pointers=1
|
|||
" -----------
|
||||
|
||||
" Fuck PEP 8, tabs are better
|
||||
let g:python_recommended_style = 0
|
||||
"let g:python_recommended_style = 0
|
||||
|
||||
" Rust {{{2
|
||||
" ---------
|
||||
|
|
Loading…
Reference in a new issue