aboutsummaryrefslogtreecommitdiff
path: root/vis-prompt.c
AgeCommit message (Collapse)AuthorFilesLines
2018-01-26vis: keep <C-j> mapped to <Enter> in command line windowMarc André Tanner1-0/+1
This keeps the existing testing infrastructure, which pipes newline separated commands to stdin, working.
2018-01-05vis: remove now unused variable in prompt handling codeMarc André Tanner1-1/+0
2018-01-03vis: fix command malfunction triggered by special cursor positionCasper Ti. Vector1-5/+2
At the command prompt, commands were not recognized properly when the cursor was placed on a delimiting character (:, ?, /) while pressing enter. Fix #653
2017-07-10vis: let '^ mark point to top of jump listMarc André Tanner1-2/+0
2017-06-27Merge branch 'show-eof' of https://github.com/p-e-w/visMarc André Tanner1-1/+1
Conflicts: view.c view.h
2017-06-15vis: rename uses of Cursor to SelectionMarc André Tanner1-2/+2
2017-06-15view: rename view_cursors_countMarc André Tanner1-1/+1
2017-06-15view: rename view_cursors_primary_{get,set}Marc André Tanner1-1/+1
2017-06-15view: rename view_cursors_clearMarc André Tanner1-1/+1
2017-06-15view: remove view_cursors_multipleMarc André Tanner1-1/+1
2017-06-15vis: promote selections to first class primitivesMarc André Tanner1-1/+1
This unifies cursors and selections. The cursor are now represendted as singleton selections.
2017-06-04Add option to hide EOF markerPhilipp Emanuel Weidmann1-1/+1
2017-03-31vis: improve tab completion in command promptMarc André Tanner1-0/+7
At some point it should probably be possible to add command prompt bindings from within Lua. Currently there is no easy/realiable way to detect the prompt window. Should improve #526.
2017-02-08vis: make sure prompt starts newline terminatedMarc André Tanner1-7/+8
2017-01-14vis-prompt: make it easier to enter multi line commandsMarc André Tanner1-29/+31
<Enter> now searches for lines starting with command delimiters to find the command boundaries. To actually enter a literal new line use <Ctrl-v><Enter> in insert mode or `o` / `O` in normal mode. Also remove the special <Backspace> mapping, does not seem esential use <Escape> to close the prompt window.
2016-05-28vis: try to reduce number of redrawsMarc André Tanner1-5/+3
This is a not yet successful attempt to reduce terminal flickering when resizing windows as is for example the case when entering command mode. UI related debug output can be enabled with: $ make CFLAGS=-DDEBUG_UI=1 $ ./vis > log
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