mirror of
https://github.com/stevenproctor/dotfiles.git
synced 2026-01-28 07:19:55 -06:00
Neovim - Trim trailing whitespace mapping
This commit is contained in:
@@ -68,3 +68,13 @@
|
||||
(nvim.ex.autocmd :FileType :sql :nmap :<leader>s :vap<leader>S)
|
||||
|
||||
(noremap :n :Q ":.!bash <CR>")
|
||||
|
||||
; Ruby old hash syntax to new hash syntax
|
||||
;(util/lvnoremap :uhs "<C-U>s/\\([a-z][^ \\t]*\\) =>/\\1:/ge" )
|
||||
;(util/lnnoremap :uhs "<C-U>s/\\([a-z][^ \\t]*\\) =>/\\1:/ge" )
|
||||
|
||||
; Trim trailing Whitespace in visual selection
|
||||
(util.lvnoremap :tw "<C-U>s/\\s\\+$//ge<CR>:nohlsearch<Enter>/<BS>")
|
||||
|
||||
; Trim trailing Whitespace in current line
|
||||
(util.lnnoremap :tw "<C-U>.s/\\s\\+$//ge<CR>:nohlsearch<Enter>/<BS>")
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
(let [map-opts {:noremap true :silent true}
|
||||
to (.. ":" to "<cr>")
|
||||
buff-num (a.get opts :buff-num)]
|
||||
|
||||
(if (or (a.get opts :local?) buff-num )
|
||||
(nvim.buf_set_keymap (or buff-num 0) mode from to map-opts)
|
||||
(nvim.set_keymap mode from to map-opts))))
|
||||
@@ -19,3 +18,6 @@
|
||||
|
||||
(defn lnnoremap [from to]
|
||||
(nnoremap (.. "<leader>" from) to))
|
||||
|
||||
(defn lvnoremap [from to opts]
|
||||
(noremap :v (.. "<leader>" from) to opts))
|
||||
|
||||
Reference in New Issue
Block a user