Emacs web mode selection word delimiters include _ -


i'm unsure of how describe question, here goes:

in emacs double-click select word, determines characters select -- called? (in terminal profile preference, called select-by-word characters, i'll use phrase.)

without web-mode, example, if double click word title in image_title, highlights title -- is, underscore recognized select-by-word delimiter.

once enabled web-mode, behavior of select-by-word changes, , underscore no longer word delimiter. in previous example, double-clicking highlights entire image_title. irritates me, commonly want select portions of underscore-delimited-identifier. (in general, i'd prefer mode not change default selection behavior.)

what option change behavior of web-mode?

edit add: in preferred mode, if double-click on _ character, select entire word including underscores. subtle precise control of selection behavior.

@lawlist - suggestions! wasn't able follow functions through entirely, did lead me along correct path:

  • found double-mouse-1, searched google
  • found mouse word selection uses global forward-word functions
  • that page mentioned syntax-table, mention syntax-table, , what have here web-mode.el contains syntax-table (and reference bug #377.)

web-mode's syntax table contains, line 1969 in v 11.2.2:

(defvar web-mode-syntax-table   (let ((table (make-syntax-table)))     (modify-syntax-entry ?_ "w" table)     (modify-syntax-entry ?< "." table)     (modify-syntax-entry ?> "." table)     (modify-syntax-entry ?& "." table)     (modify-syntax-entry ?/ "." table)     (modify-syntax-entry ?= "." table)     (modify-syntax-entry ?% "." table)     table)   "syntax table used reveal whitespaces.") 

i assume ?_ "w" means it's treating _ word character. changed "w" "." , underscore being treated word boundary wanted!

hooray stack overflow, google, , github.

also, i've got correct keywords, stack overflow suggests potentially helpful related answer: changing emacs forward-word behaviour


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -