Archived
Some random changes
This commit is contained in:
@@ -59,13 +59,13 @@
|
||||
;; Remove trailing whitespace
|
||||
(fn remove-trailing-whitespace []
|
||||
"Remove trailing whitespace from the whole file."
|
||||
(let [res (pcall vim.cmd "%s/ \\+$//gc")]
|
||||
(let [res (pcall vim.cmd "%s/ \\+$//")]
|
||||
(vim.cmd.nohlsearch)
|
||||
(when (not res)
|
||||
(print "File is clean"))))
|
||||
(vim.api.nvim_create_user_command :RemoveTrailingWhitespace
|
||||
remove-trailing-whitespace {})
|
||||
(bind! :n :<leader>ws remove-trailing-whitespace)
|
||||
(hook! [ :BufWritePre ] "*" remove-trailing-whitespace)
|
||||
|
||||
;; Spell keybindings
|
||||
(bind! :n :<leader>l (fn []
|
||||
|
||||
Reference in New Issue
Block a user