From 616241470486ed2cd4098b12c72b49c66c083607 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 29 Nov 2021 10:10:52 +0900 Subject: neovim/vim: add key mappings to toggle some options --- .vimrc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 04e11e1..bef1d50 100644 --- a/.vimrc +++ b/.vimrc @@ -289,6 +289,29 @@ nnoremap tc c nnoremap to o nnoremap tO :tabonly +nnoremap T + +nnoremap Tb :if &background == 'dark' set background=light else set background=dark endif +nnoremap Tc :set cursorcolumn! set cursorline! +nnoremap Td :if &diff diffoff else diffthis endif +nnoremap Te :set expandtab! +nnoremap Th :set hlsearch! +nnoremap Tn :set number! +nnoremap Ts :set spell! +nnoremap T8 :if &textwidth ==# 80 set textwidth= else set textwidth=80 endif +nnoremap T0 :if &textwidth ==# 100 set textwidth= else set textwidth=100 endif +nnoremap T2 :if &textwidth ==# 120 set textwidth= else set textwidth=120 endif +nnoremap Tw :set wrap! + +nmap TB Tb +nmap TC Tc +nmap TD Td +nmap TE Te +nmap TH Th +nmap TN Tn +nmap TS Ts +nmap TW Tw + nnoremap gh nnoremap gH nnoremap g -- cgit v1.2.3-70-g09d2