aboutsummaryrefslogtreecommitdiff
path: root/vis-prompt.c
AgeCommit message (Collapse)AuthorFilesLines
2016-05-13vis: clean up key mapping implementationMarc André Tanner1-6/+6
2016-04-18vis: use internal file to show lua errorsMarc André Tanner1-6/+5
This means no event handlers are run for it, hence there is no chance for recursive errors.
2016-04-03sam: unify vi(m) and sam command lineMarc André Tanner1-6/+1
The following vi commands have been dropped: - saveas - xit - ! The following commands are only recognized in their short form: - e (edit) - q (quit) - s (substitute) - w (write) - r (read)
2016-04-03Support sam's structural regular expression based command languageMarc André Tanner1-1/+1
For those not familiar with sam(1) more information can be found at http://sam.cat-v.org/ For now sam commands can be entered from the vis prompt via :sam <cmd> A command behaves differently depending on the mode in which it is issued: - in visual mode it behaves as if an implicit extract x command matching the current selection(s) would be preceding it. That is the command is executed once for each selection. - in normal mode: * if an address for the command was provided it is evaluated starting from the current cursor position(s) i.e. dot is set to the current cursor position. * if no address was supplied to the command then: + if multiple cursors exist, the command is executed once for every cursor with dot set to the current line of the cursor + otherwise if there is only 1 cursor then the command is executed with dot set to the whole file The command syntax was slightly tweaked to accpet more terse commands. - When specifiying text or regular expressions the trailing delimiter can be elided if the meaning is unambigious. - If only an address is provided the print command will be executed. - The print command creates a selection matching its range. - In text entry \t inserts a literal tab character (sam only recognizes \n). Hence the sam command ,x/pattern/ can be abbreviated to x/pattern If a command is successful vis switches to normal mode (and hence removes any selections), otherwise the editor is kept in visual mode. The print command "fails" by definition.
2016-03-28vis: cleanup usage of vis_cursors_countMarc André Tanner1-1/+1
2016-03-15vis: slightly cleanup register related codeMarc André Tanner1-1/+1
2016-03-15vis: add support for command register ":Marc André Tanner1-0/+1
2016-03-10view: clean up API functions related to primary cursor handlingMarc André Tanner1-1/+2
The currently visible display port is always adjusted in a way that the primary cursor is visible.
2016-02-12vis: remove trailing new line before executing prompt commandMarc André Tanner1-1/+5
This should actually make the search history functionality work. The :-commands already worked because of commit e745b5ef. Removing all trailing white spaces would be the wrong thing to do for the search, because they might be part of the desired search string.
2016-02-10vis: simplify modes implementationMarc André Tanner1-2/+0
Make replace mode a child of insert mode and visual line a child of visual mode. This means any key binding for the former is automatically available in the latter. Also keys can not be unmapped solely from the child modes.
2016-01-30Improve Lua error reportingMarc André Tanner1-0/+23
Display Lua errors in a dedicated window/file. A typo or missing dependency (e.g. lpeg) in visrc.lua will no longer silently fail without any indication. The Lua integration in view.h is not yet converted.
2016-01-19vis: switch to normal mode if a :-command was successful in visual modeMarc André Tanner1-2/+8
2016-01-16vis: move selected prompt entry to end of the fileMarc André Tanner1-1/+7
Close #70
2016-01-14vis: move prompt handling to separate fileMarc André Tanner1-0/+177