aboutsummaryrefslogtreecommitdiff
path: root/text-objects.c
AgeCommit message (Collapse)AuthorFilesLines
2018-03-05Fix a typo in identifiersTwoFinger1-1/+1
2018-02-28vis: improve handling of linewise ranges in change operatorMarc André Tanner1-1/+1
2018-02-27vis: implement normal/outer paragraph text objectMarc André Tanner1-0/+6
2018-02-27text-object: implement more precise paragraph text objectMarc André Tanner1-2/+31
Fix #543 Close #588
2017-04-09text: drop special handling of \r\n line endingsMarc André Tanner1-5/+5
2017-04-08text: simplify \r\n handlingMarc André Tanner1-6/+6
2017-03-05text-object: remove C implementation of file name text objectMarc André Tanner1-27/+0
This is no longer needed now that the completion logic was moved to Lua.
2017-02-23text-object: remove text_object_numberMarc André Tanner1-23/+0
This was only used by the number increment/decrement action. The same functionality (and more) can be implemented in lua using something like: vis:textobject_new("in", function(win, pos) return win.file:match_at(vis.lexers.integer + vis.lexers.float, pos, 64) end, "Number text object")
2017-02-15vis: remove motion and text objects related to C functionsMarc André Tanner1-31/+0
These do not really belong into the editor core. If desired they could be implemented in Lua instead.
2017-01-16vis: fix single letter word text objects at start of fileMarc André Tanner1-2/+2
Fix #464
2016-12-23text-objects: explicitly ignore return value of strtoll(3)Marc André Tanner1-1/+1
We are only interested in the first invalid character.
2016-08-07text-object: add ` as a delimiter for file name text objectsMarc André Tanner1-1/+1
In general it might be a better idea to specify these kinds of text objects in terms of characters belonging to them rather than listing a set of delimiting characters. Fixes #350
2016-04-11text-motions: fix misspelled function name "is_word_boundry"Steven Noonan1-2/+2
Should be "is_word_boundary" Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2016-04-06text-object: fixup last commit, add accidentally missed hunkMarc André Tanner1-0/+1
2016-04-06vis: make af and if text objects more robustMarc André Tanner1-10/+21
It still assumes that a function is terminated by the "\n}" seqeuence and uses the same code as the % motion for matching curly braces. Hence this won't work for functions containing an unbalanced number of { or } symbols (e.g. due to comments or strings etc). Also due to the way text objects are implemented in general the inner variant will only work properly if the cursor is located somewhere within the function. Otherwise it will include everything from the current cursor position up to the end of the function body.
2016-03-23Remove identically replicated copyright comments from source filesMarc André Tanner1-15/+0
2016-02-15Add text object to cover lines with same indentation levelMarc André Tanner1-0/+56
By default it is mapped to i<Tab> and a<Tab> however there is currently no difference between the inner and regular version.
2016-02-12text-object: simplify text_object_range implementationMarc André Tanner1-6/+5
We can copy the initial iterator and use it in reverse direction.
2016-02-11vis: implement gn and gN text objectsMarc André Tanner1-0/+20
The behaviour when no match is found is not yet optimal.
2016-02-07text-object: introduce text_object_filenameMarc André Tanner1-0/+15
2016-02-07text-object: introduce text_object_numberMarc André Tanner1-0/+25
2016-02-03text-object: add utility function for abitrarily delimited text objectsMarc André Tanner1-0/+13
2016-02-03text-object: hide ugly casts for isboundary behind a #defineMarc André Tanner1-29/+29
2016-02-03text-object: hide ugly casts for isspace behind a #defineMarc André Tanner1-4/+5
2016-02-03text-object: merge word/WORD implementationsMarc André Tanner1-89/+37
2016-02-03text-object: fix bugs in outer word `aw` implementationMarc André Tanner1-2/+2
2015-11-23Cast argument to ctype.h is* functions to unsigned charMarc André Tanner1-10/+10
The signedness of char is implemenation defined, calling the is* type of functions with negative values leads to undefined behaviour.
2015-11-19vis: fix <C-n> in visual mode for partial matchesMarc André Tanner1-1/+1
We need to properly skip partial matches (i.e. not whole words). Closes #118
2015-11-08Update year numbers in Copyright clauseMarc André Tanner1-1/+1
2015-08-06vis: implement al and il text objectsMarc André Tanner1-0/+17
2015-08-02vis: add text objects `af` and `if`Marc André Tanner1-0/+19
They try to match C-like function definitions. The inner variant only contains the function body.
2015-08-01vis: support `ae` and `ie` text objectsMarc André Tanner1-0/+17
2015-07-28text-object: introduce utility function text_range_is_linewiseMarc André Tanner1-0/+6
2015-07-28text: move utility functions to separate fileMarc André Tanner1-0/+1
2015-07-26text-object: add new functions to search for wordsMarc André Tanner1-0/+31
2015-07-23text-object: add text_range_linewiseMarc André Tanner1-0/+8
Takes a range and extends both ends to cover the remaining part of the line.
2014-12-23Distinct between inner and outer word text objectsMarc André Tanner1-6/+78
2014-09-27Add text objects for word (lowercase) variantMarc André Tanner1-15/+25
2014-09-25Perform some renames in preparation for different word typesMarc André Tanner1-13/+13
2014-09-25Add text_object_word_raw which does not include any whitespacesMarc André Tanner1-0/+32
2014-09-17Simplify text_object_line implementationMarc André Tanner1-7/+1
2014-09-13Introduce some helper functions dealing with FilerangeMarc André Tanner1-10/+5
2014-09-10Add license headerMarc André Tanner1-0/+15
2014-09-03Introduce a logical line as text-objectMarc André Tanner1-0/+13
2014-08-31Expose various text objects with individual functionsMarc André Tanner1-1/+29
2014-08-30Add support for backticks to movement and text objectMarc André Tanner1-1/+2
2014-08-28text-objects: add objects delimited by brackets or quotesMarc André Tanner1-1/+52
2014-08-28text-object: make word object behave more like in vimMarc André Tanner1-6/+6
2014-08-28text-object: correctly detect word boundriesMarc André Tanner1-7/+24
2014-08-25Move motion related stuff into own fileMarc André Tanner1-0/+38