This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; runs eslint --fix on the current file after save | |
;;; alpha quality -- use at your own risk | |
(defun eslint-fix-file () | |
(interactive) | |
(message "eslint --fixing the file" (buffer-file-name)) | |
(shell-command (concat "eslint --fix " (buffer-file-name)))) | |
(defun eslint-fix-file-and-revert () | |
(interactive) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Motion for "next/last object". For example, "din(" would go to the next "()" pair | |
" and delete its contents. | |
onoremap an :<c-u>call <SID>NextTextObject('a', 'f')<cr> | |
xnoremap an :<c-u>call <SID>NextTextObject('a', 'f')<cr> | |
onoremap in :<c-u>call <SID>NextTextObject('i', 'f')<cr> | |
xnoremap in :<c-u>call <SID>NextTextObject('i', 'f')<cr> | |
onoremap al :<c-u>call <SID>NextTextObject('a', 'F')<cr> | |
xnoremap al :<c-u>call <SID>NextTextObject('a', 'F')<cr> |