summaryrefslogtreecommitdiff
path: root/vis-operators.c
AgeCommit message (Collapse)Author
2025-01-12array: delete onelinersRandy Palamar
same as buffer commit Array is completely visible
2025-01-11buffer: clear out one line functionsRandy Palamar
Buffer is fully exposed to the program, no need to rely on the linker to optimize useless code.
2024-05-21remove some view pointer chasingRandy Palamar
Same as previous commit each window only has a single View. No need for it to be stored elsewhere in memory.
2024-05-21make View unopaqueRandy Palamar
2024-05-21cleanup some single line get/set functionsRandy Palamar
2023-08-27Make expandtab option window-localAlexey Yerin
2023-08-27Make tabwidth option window-localAlexey Yerin
2020-05-30vis: fix implicit enum conversion warningMarc André Tanner
2018-05-16vis: implement g~ using tr(1)Marc André Tanner
2018-05-16vis: implement gU using tr(1)Marc André Tanner
2018-05-16vis: implement gu using tr(1)Marc André Tanner
2018-02-28vis: improve handling of linewise ranges in change operatorMarc André Tanner
2017-12-21vis: do not override default register on delete operations in insert modeMarc André Tanner
Fix #644
2017-09-15vis: remove ! operatorMarc André Tanner
Use visual mode and :| to filter text through external commands. The mapping was already reused for selection complement.
2017-06-15view: rename view_cursors_newMarc André Tanner
2017-05-03text: remove text_insert_newline functionMarc André Tanner
This is no longer needed because we always insert \n never \r\n.
2017-04-19vis: restructure register handlingMarc André Tanner
Decouple register content from cursors. Previously each cursor had exactly one corresponding register. Now each register can save a list of values whose lifetime is not tied to the cursor. If multiple cursors exist and a put with a register holding only a single value is performed, then this value is inserted at every cursor location. If there are fewer values available than cursors, then only the matching ones will be used. If a register holding multiple values is inserted in a single cursor context, only the first value will be used. Another option would be to join all existing values. The details of this behavior might be changed in the future. <C-r> in insert mode has not yet been adapted and register handling in general needs to be cleaned up further. Fix #527
2017-04-09vis: remove handling of \r\n line endingsMarc André Tanner
Use something like dos2unix(1) and unix2dos(1), if you need to edit such files.
2017-03-22vis: do not indent empty lines when right shifting with `>`Marc André Tanner
The exception being when the range is a single line.
2017-03-19vis: add infrastructure for user specified operatorsMarc André Tanner
2017-02-28vis: improve cursor positioning after shift operatorsMarc André Tanner
There are still issues with left shifts starting from characterwise visual mode when the selection boundaries are deleted. For now this is considered a pilot error. Fix #508
2017-02-22vis: simplify `r` implementation and fix cursor positioningMarc André Tanner
2017-02-01vis: insert new line after linewise change commandsMarc André Tanner
This should also (at least partially) address the issues raised in #440 and #442.
2017-01-20vis: slightly cleanup repeat code, always set dot registerMarc André Tanner
2016-12-22text: introduce EMARK to denote an invalid markMarc André Tanner
Technically this macro name is in the reserved namespace of errno.h. The same is true for EPOS. Maybe we should rename them at some point, but for now the short names are convenient. Fix #443 Close #444
2016-11-19vis: keep track of whether "0 stores line wise dataMarc André Tanner
2016-11-09vis: add replace operator VIS_OP_REPLACEMarc André Tanner
Delete the given range and insert the same number of replacement characters.
2016-11-09vis: unify VIS_OP_{INSERT,REPLACE} implementationMarc André Tanner
They both perform a motion before changing mode.
2016-10-28vis: tweak join behaviorMarc André Tanner
We only remove leading but not trailing white space of the lines to be joined. Not completely sure whether that is an improvement, but it matches vim behavior. Do not insert a space when joining empty lines.
2016-10-09vis: fix join operator to work on lines ending with white spacesMarc André Tanner
Extend the operator range to cover white spaces to the left of the cursor position on the same line. Close #400
2016-08-24vis: implement gJ like behaviorMarc André Tanner
The behavior is not exactly the same because vim preserves any existing white spaces wihle we remove existing ones but do not insert additional ones. The vim behavior (essentially only deleating new lines) can be achived using something like: :x/\n/d Close #374
2016-08-24vis: improve dot (repeat) command implmentationMarc André Tanner
Do not override implicit operator macro in command mode. Fix #334
2016-04-29vis: improve cursor placement after join operatorMarc André Tanner
Close #299
2016-04-27vis: adapt charwise put operator to not move across linesMarc André Tanner
This should let `$p` work as before the changes to `$`.
2016-04-13Use view_cursors_new_force where appropriateMarc André Tanner
Close #263
2016-04-09vis: make sure linewise put operations insert necessary new linesMarc André Tanner
Given the following text with no trailing new line at the end of line2, where # denotes the cursor position: line1 of text line2 #f text the command yykp should produce line1 of text #ine2 of text line2 of text where previously it would wrongly result in line1 of text #ine1 of textline2 of text
2016-03-28view: change cursor creation API to take an initial positionMarc André Tanner
2016-03-12register: rename register put related functionsMarc André Tanner
2016-02-21vis: only move to start of yanked range if it is not line wiseMarc André Tanner
Otherwise this completely breaks the common case of yanking a whole line with yy. This also means that the beavior in visual line mode is different than in vim. Partially reverts ff57c0b8598a60617983ebe25d34c79a9c6bc511.
2016-02-21vis: insert missing new line when putting at the end of fileMarc André Tanner
Something like ifoo<Escape>yyp should produce foo foo not foofoo as was the case before.
2016-02-18vis: move cursor to start of yanked rangeMarc André Tanner
Close #176
2016-02-12Mark some tables as constMarc André Tanner
This allows them to be placed into the read only ELF section.
2016-02-10vis: implement yank register "0Marc André Tanner
2016-01-30Implement system clipboard registers "* and "+Marc André Tanner
Both registers are currently treated identically. The actual system integration is performed by two shell scripts vis-copy and vis-paste.
2016-01-30Cleanup register implementationMarc André Tanner
2016-01-19vis: improve cursor placement after shift operatorsMarc André Tanner
2016-01-14vis: s/ops/vis_operators/gMarc André Tanner
2016-01-14vis: move vis_operator(..) to corresponding fileMarc André Tanner
2016-01-14vis: inline expand_tabMarc André Tanner
2015-11-28vis: add cmd argument to VIS_OP_FILTERMarc André Tanner