1 add textobjects for head, tail, and body, working from anywhere in the list.
2 the one for body should encompass all sexps after the last_distinguished argument.
4 add textobject for ]e, but just redefine aw to take count and to use it to skip words
6 "far" objectwise paste - after the current _list_?
9 push expand region semantic ranges on a stack, so they can be shrunk later.
10 lateral semantic motions could be recorded as well?
13 yyp/ddp a line comment pastes it after the whole series of comments
14 inside a list is even weirder. I guess the paste is wrong, not the yank/delete
16 vis-only: dot-repeating a daw accumulates the words in the register, instead of overwriting.
18 db on ) and paste is not objectwise.
19 it IS whole_object, and splice-killing.
21 copying "asdf) (qwer" will return asdfqwer - concatenated.
23 M-C-e jumps backwards when at the beginning of a line comment block
24 it also crashes when on a comment right at EOF
26 in TA/howl replace ctrl+alt+left/up for splice-killing with something that
27 does not involve arrows. use the ctrl+alt+left/right for the floating motions.
29 Make delete hungry even in between sexps on the same line
30 (now it works at indentation and before closing paren)
32 Enter inside an atom before a margin comment doesn't split the atom.
34 vis-only: adopt some things from symex:
35 instead of gT for transpose-sexps, use move/shift left and right (H and L in symex.)
37 vis-only: make emacs mark work for all selections
39 why escaped_at() in the very first line comment returned nil?
41 ; at top level before a one-line sexp doesn't comment it out.
43 ; _right_ after a line comment opens a margin comment. should open a same-level comment
45 move the prefix^1 from the parser into the dialect-specific configs.
46 some prefixes can concatenate, but for others it doesn't make sense,
47 or it does only for some combinations.
49 reconfigure the parser - newLISP has even weirder rules than picolisp - the multi esc is [square brackets],
50 there is overlap for line comments and block comments - # and #{} (parsing it is fine, but input cannot be smart)
51 the current heuristics for deciding what delimiter is list and what is not will be wrong.
52 explicit separation is necessary.
53 An extra dict with the opening delims of string/multiesc AS KEYS.
54 This way it will be impossible to list two delims for different roles. (If you do, it will be obvious mistake)
55 local roles = {['"'] = "string", [';'] = "comment", ['#|'] = "comment"}
56 local roles = {['"'] = "string", ['{'] = "string", ['[text]'] = "string",
57 ['['] = "multiesc", [';'] = "comment", ['#'] = "comment"} -- newlisp
61 ['"'] = {['"'], string = true},
62 ['#|'] = {['|#'], comment = true}}
64 see if symbol\ with\ spaces is supposed to be a single symbol in some dialects
66 ) when at top-level, to call repl_send? (like in lisp machines and Medley)
67 (but my mode is hybrid, what to do when an actual enter is pressed.
68 or, if we autoinsert enter after a ), what if there was already an
71 FIXME: add nline to delimited_range and nested_pair
73 when autopairing a new () right after the last distinguished arg, automatically
74 wrap on a new line. (like in Medley)
76 see if the Cp() * Cc(offset) / incr could be simplified to Cp() and do
77 the incr on access of .start/.finish with a metatable?
78 seems like the incr place is a hotspot. but the perf says it's a C func,
79 so maybe it's just Cp() and is unavoidable.
81 use 'bisect' insertion instead of the current rewind + cut off.
82 the sexps past the current one will have to be traversed and have .start/.finish corrected.
83 Is this going to be slow?
86 - take care of backslash-escaped chars in " and | blocks (what about comments?).
87 no need to delete the backslash along with the char in \a, only if they are exactly before a closing doublequote
88 no need to ask Character to escape:, just make sure it's not exactly before a delimiter, and it's not missing a leading #,
90 - remove the whole #\a when deleting any of the three chars? (because it might be #\\)
91 - define the character literal per language:
92 Clojure \h, \uNNNN, \backspace \formfeed \newline \return \space \tab
93 Scheme #\h, #\xNN, \alarm \backspace \delete \escape \newline \null \return \space \tab
95 why, though? for correct space-delimiting during fmt; for safe deletion;
97 change pick_out to preserve not only ") (" space but "^ (" too
98 otherwise M-d destroys the space separators and indentation
99 OR, preserve "atom (" and ") atom" too.
100 OR, remove even the ") (" and just call refmt when #skips > 0
102 not all struct operators make sense through pick_out; some work on the innermost sexp that surrounds the selection.
103 wrap/doublequote work, but is this useful; should I change the definition
105 see why trailing_space in refmt_list DOESN'T modify adj.
108 ;;; comments cause wrong count of sexps
109 and the stored sexp_path can't be fullfilled
110 separating the ^L fixes the issue
112 motions inside the very last defun always trigger reparses with advance of -1
113 check where in the code this could happen. probably the [#parent + 1] trick (see below)
115 find a less wasteful way to detect EOF than the parent[#parent + 1] autovivification trick,
116 which reparses the next defun one or more times.
118 in input:insert_pair(), (and everywhere), when the cursor is right after a ;;;; comment
119 _, parent = sexp_at() (and sexp_path) return THE COMMENT, not nil, root, or {}
120 this is consistent, like with sexp| but is confusing. is is useful to keep it?
121 no, it's not consistent - not if the PARENT is the comment
123 instead of node, parent = sexp_at(), which is just a special case,
124 use sexp_path everywhere. The full crumbtrail it returns gives more opportunities.
125 put the n index of each sexp into its node in the parse tree.
127 when i delete stuff in a list, and this list is at operand position in its parent,
128 the parent should reindent, but doesn't. The problem is that, when I'm insert mode,
129 I don't wan't to refmt the current list, it will wipe all the spaces.
130 But the problem occurs even in normal mode. I could fix at least that?
131 but this means that refmt should _always_ creep up to top level. which I avoid deliberately.
134 + several = are needed to fully refmt certain lists - inserting/pasting a multiline between two multilines.
135 or joining a multiline before another multiline (like in let). !!! !!! !!!
136 + raising multiline lists ends up with a wrong indent, sometimes (in a let) (Check if it is the same issue as above)
137 - _multiline_ strings/block-comments mess up the indent after them, if the next sexp is on the same line as the string
138 the column of the closing delimiter is calculated as if the string was one-liner. Using bol_at wold work, but vis
139 doesn't have one that works for arbitrary offsets.
140 - M-q on an empty line puts the cursor like C-a. could be either as Del or Backspace (next or prev sexp)
141 (currently it seems like it works as after_finish should)
143 Tabs mess up indenting; the indent code counts each char as width=1, but tabs are longer.
145 add .lines property to quasilists during parsing.
146 this way i can know how many lines are in a list or multiline string or block comment
147 and fix some of the problems with fmt
149 clojure: defn squarewords - it supports doc-string? attr-map? before the [params*]
151 the table values I used with squarewords might be necessary for indent too.
152 in clojure-mode they call it backtracking indent, it is a list instead of a scalar number
153 maybe use the pattern-matching that I planned to replace sexp_at for the indent expressions as well.
154 (if suitable, though)
156 add a new function - reindent_defun_kr: (or _otbs)
157 to put each closing paren on a line of its own.
158 And make it possible to toggle between the two styles.
160 make paragraph motions while in a group of line comments move to the beginning/end of _the group_
161 (instead of doing what backward-up/forward-up already do)
163 for fmt, consider using patterns for configuration, like cl-indentify
165 Objectwise deletion happens even without textobjects being explicitly used. Instead, the condition is whether a word/sexp
166 disappears as result of the deletion. With lists, this is a feature, you don't normally want lingering
167 spaces. But in strings/comments, where there are no particular rules about whitespace, this can be considered a bug.
169 reset cursor position to the beginning of the sexp/list on splice, raise, splice-killing?
170 some other paredits do that (it varies, though).
171 this would "fix" the annoyance where the cursor jumps to the next sexp after splice-killing.
172 it was deliberate (to not leave the cursor in whitespace, mostly to tame autoselect), and is okay when deleting,
173 but is annoying when splice-killing.
175 Racket has here strings. add them to the parser
188 D doesn't gather the closing paren to the prev line. If the cursor was exactly |asdf, then it does gather the paren.
190 M-d crashes in ;;; comment with only spaces inside, in all editors
191 the cursor must be right after ";;; ". if further in, it is not reproducible.
192 the difference comes from pick_out - ndeleted is 0 when crashing, and higher when not
193 but the cursor position is weird when not crashing.
195 x-ing the |# of a block comment lands the cursor one char too far