dots

Personal dotfiles
git clone git://git.gormless.xyz/dots.git
Log | Files | Refs

nexrc (1817B)


      1 """			MACROS (KEYBINDINGS)			"""
      2 " double space, whole file
      3 map gd :%!sed G
      4 " delete comments
      5 map gu :g/#.*$/d
      6 " quit
      7 map ZQ :q!
      8 " write and quit as root
      9 map ZD :w !doas tee %
     10 " go to top
     11 map gg 1G
     12 " compile a document
     13 map gc :w!
:!compiler "%"

     14 " sync website
     15 map ge :w!
:!elephant

     16 " remove whitespace
     17 map gt mm:%s/[[:space:]]*$//
`m
     18 " format paragraphs
     19 map gp :?$?,//!fmt -pw 72
     20 " toggle line wrapping
     21 map gw :set wraplen=72
     22 " wrap lines
     23 map K 72|lF r
     24 " format text
     25 map gf :%!fmt -w 72 -s
     26 " find declaration of the following local identifier
     27 map v mx`x[[(n`x``
     28 " find declaration of the following global identifier
     29 map V mx`x1Gn`x``
     30 " tmux buffer manipulation
     31 map gx !'mtmux load-buffer -
     32 map gy !'mtmux load-buffer -
u
     33 map gp :r!tmux show-buffer
     34 " conjoin lines
     35 map gJ Jx
     36 " re-run commands globally
     37 map g& :a%
     38 
     39 """			TUNABLE OPTIONS			"""
     40 " Autoindentation
     41 set ai
     42 " Discard control characters
     43 set bf
     44 " Char to edit command-line history.
     45 set cedit=
     46 " Case insensitive searches
     47 "set ignorecase
     48 " Hide whitespace and EOL characters
     49 set nolist
     50 " show line numbers
     51 "set nu
     52 " Display a row/column ruler
     53 set ruler
     54 " Additional section boundaries
     55 set sections=SeAhBhChDh 
     56 " Shell env for ! commands
     57 set shell=/bin/sh
     58 " Show matching brackets
     59 set showmatch
     60 " Display current editor mode
     61 set showmode
     62 " Shift width in spaces
     63 set sw=3
     64 " TAB width in spaces
     65 set tabstop=3
     66 " Verbose error messages
     67 set verbose
     68 " Jump over the first comment block in source files
     69 set comment
     70 " Enable search-as-you-type
     71 set searchincr
     72 " Briefly jump the cursor to a matching bracket/parenthesis when typing
     73 set showmatch matchtime=1
     74 " Display more error messages
     75 set verbose
     76 " Make regular expressions in commands and searches case insensitive,
     77 " unless there is an upper-case letter
     78 set iclower
     79 " show line numbers
     80 set number