summaryrefslogtreecommitdiff
path: root/vis-prompt.c
AgeCommit message (Collapse)Author
2024-05-24combine Win and UiWinRandy Palamar
These are not seperate things and keeping them this way makes gives this convoluted mess where both Wins and UiWins must have linked lists to the other Wins and UiWins in the program despite the fact that neither of them can exist in isolation. This, like my previous cleanup commits, is part of a larger goal of properly isolating the various subsystems in vis. Doing so is required if we ever want to be able to have a vis-server and a vis-client.
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-21remove some ui pointer chasingRandy Palamar
There only exists a single Ui so there is no need to force a pointer redirection for accessing it. The Ui member was moved down in vis-core.h to punt around an issue with the way lua checks for existing objects. It may show up again as I flatten more structs.
2024-05-21replace UiTerm with Ui & delete function pointersRandy Palamar
2024-05-21make Selection unopaqueRandy Palamar
2024-05-21make View unopaqueRandy Palamar
2023-05-28remove unused vis_message_hide() functionRandy Palamar
the message window gets closed like a normal window and nothing calls this function. In fact, it wasn't even used when it was added 8 years ago in 979ab79.
2020-09-19Add ignorecase optionEvan Gates
Add a global ignorecase boolean option. When set add REG_ICASE to cflags when calling text_regex_compile().
2018-01-26vis: keep <C-j> mapped to <Enter> in command line windowMarc André Tanner
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é Tanner
2018-01-03vis: fix command malfunction triggered by special cursor positionCasper Ti. Vector
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é Tanner
2017-06-27Merge branch 'show-eof' of https://github.com/p-e-w/visMarc André Tanner
Conflicts: view.c view.h
2017-06-15vis: rename uses of Cursor to SelectionMarc André Tanner
2017-06-15view: rename view_cursors_countMarc André Tanner
2017-06-15view: rename view_cursors_primary_{get,set}Marc André Tanner
2017-06-15view: rename view_cursors_clearMarc André Tanner
2017-06-15view: remove view_cursors_multipleMarc André Tanner
2017-06-15vis: promote selections to first class primitivesMarc André Tanner
This unifies cursors and selections. The cursor are now represendted as singleton selections.
2017-06-04Add option to hide EOF markerPhilipp Emanuel Weidmann
2017-03-31vis: improve tab completion in command promptMarc André Tanner
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é Tanner
2017-01-14vis-prompt: make it easier to enter multi line commandsMarc André Tanner
<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é Tanner
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é Tanner
2016-04-18vis: use internal file to show lua errorsMarc André Tanner
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é Tanner
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é Tanner
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é Tanner
2016-03-15vis: slightly cleanup register related codeMarc André Tanner
2016-03-15vis: add support for command register ":Marc André Tanner
2016-03-10view: clean up API functions related to primary cursor handlingMarc André Tanner
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é Tanner
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é Tanner
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é Tanner
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é Tanner
2016-01-16vis: move selected prompt entry to end of the fileMarc André Tanner
Close #70
2016-01-14vis: move prompt handling to separate fileMarc André Tanner