aboutsummaryrefslogtreecommitdiff
path: root/ui.h
AgeCommit message (Collapse)AuthorFilesLines
2017-06-10More theme improvementsPhilipp Emanuel Weidmann1-0/+1
2017-03-16ui: further cleanup display codeMarc André Tanner1-1/+0
2017-03-14Add experimental raw vt100 UI backendMarc André Tanner1-0/+15
The intention of this is not to slowly reimplement curses but to provide a minimal working terminal UI backend which can also be used for debugging, fuzzing and in environments where curses is not available. Currently no attempt is made to optimize terminal output. The amount of flickering will depend on the smartness of your terminal emulator.
2017-03-14Restructure display codeMarc André Tanner1-4/+21
Use pull instead of push based model for display code. Previously view.c was calling into the ui frontend code, with the new scheme this switches around: the necessary data is fetched by the ui as necessary. The UI independent display code is moved out of view.c/ui-curses.c into vis.c. The cell styles are now directly embedded into the Cell struct. New UI styles are introduced for: - status bar (focused / non-focused) - info message - window separator - EOF symbol You will have to update your color themes. The terminal output code is further abstracted into a generic ui-terminal.c part which keeps track of the whole in-memory cell matrix and #includes ui-terminal-curses.c for the actual terminal output. This architecture currently assumes that there are no overlapping windows. It will also allow non-curses based terminal user interfaces.
2016-11-15vis: defer UI initialization and overhaul argument parsingMarc André Tanner1-1/+0
Do not initalize curses UI before it is actually needed. Move vis command line argument parsing logic into main.c. This fixes `vis -v` output and exit status. Fix #351
2016-11-14vis-lua: add vis.ui.colors denoting the number of available colorsMarc André Tanner1-0/+1
2016-11-14ui: remove unused functionMarc André Tanner1-1/+0
2016-10-27vis: apply language map only to key values not modifiersMarc André Tanner1-1/+1
The language map translation should not take modifiers into account. For example if `a` is mapped to `b` then `<M-a>` should also be mapped to `<M-b>`. Fix #404
2016-05-22vis: refactor status line handlingMarc André Tanner1-1/+0
Make window status bar content configurable via Lua.
2016-05-22vis: add function to change window statusbar contentMarc André Tanner1-0/+1
2016-05-22vis: add functions to query window sizeMarc André Tanner1-0/+2
2016-05-22ui: s/UiStyles/UiStyle/gMarc André Tanner1-1/+1
2016-05-10Revert "vis: clean up interaction between vis and ui"Marc André Tanner1-1/+4
This caused issues on OpenBSD where it crashed the terminal. Also on Mac OS X suspend via ^Z (Ctrl-Z) was missing a \r i.e. the shell prompt was not properly redrawn. While in principle user interfaces should not have to depend on libtermkey, in practice this won't be an issue unless we are adding a non-terminal based UI (which won't happen anytime soon). This reverts commit 8f92b98848f9366e78c7aa824615bade83971513. Close #311
2016-05-04vis: enable large file optimizations for files with long linesMarc André Tanner1-0/+5
2016-05-04vis: clean up interaction between vis and uiMarc André Tanner1-4/+1
A concrete user interface implementation should not have to depend on libtermkey. Therefore the vis core now uses an independent instance to parse keys.
2016-04-08vis: let :e recreate a window at the same location as the old oneMarc André Tanner1-0/+1
Close #224
2016-03-10ui: make primary cursor blinkMarc André Tanner1-0/+1
2016-02-12Improve large file supportMarc André Tanner1-0/+1
Disable absolute line numbers for large files (currently anything bigger than 32MiB). This speeds up moving around with for example nn% since no new lines need to be calculated. Of course movements like :nn will be unaffected. The optimizations can be disabled by explicitly enabling absolute line numbers as in :set number
2016-01-30Implement system clipboard registers "* and "+Marc André Tanner1-1/+1
Both registers are currently treated identically. The actual system integration is performed by two shell scripts vis-copy and vis-paste.
2016-01-30Improve Lua error reportingMarc André Tanner1-0/+1
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-13Implement command/search prompt history as a regular fileMarc André Tanner1-4/+1
2016-01-13ui: make statusbar configurableMarc André Tanner1-1/+3
2015-12-20vis: fix forceful redraw <C-l>Marc André Tanner1-0/+1
2015-11-08Fix warnings found by static analyzerMarc André Tanner1-1/+1
2015-11-08Remove trailing white space from source filesMarc André Tanner1-1/+1
2015-11-08vis: implement :set colorcolumnMarc André Tanner1-0/+1
2015-11-08vis: implement :set cursorlineMarc André Tanner1-0/+2
2015-11-08vis: experimental support for lua/lpeg based syntax highlightingMarc André Tanner1-1/+8
The lua based lexers are searched in the following order: $VIS_PATH/lexers $HOME/.vis/lexers /usr/share/vis/lexers followed by the standard lua package.path
2015-11-07vis: API documentation and cleanupMarc André Tanner1-1/+0
2015-10-26vis: merge editor.c into vis.cMarc André Tanner1-2/+2
2015-10-22ui: introduce and use ui specific die(...) functionMarc André Tanner1-0/+1
2015-10-15ui: cleanup redrawingMarc André Tanner1-1/+0
2015-10-14view: cleanup whitespace replacement symbol handlingMarc André Tanner1-1/+5
2015-10-14view: cleanup option handlingMarc André Tanner1-1/+2
2015-10-14ui: refactor syntax style definitionsMarc André Tanner1-3/+7
Styles can now be specified as strings which will make them easier to specify from outside the editor. The following style attributes can be given in a comma separated list: bold italics underlined fore:color back:color where color is either a hex value of the form #aabbcc or one of the predefined colors: black red green yellow blue magenta cyan white
2015-10-05vis: rework input handling using libtermkeyMarc André Tanner1-6/+3
Key bindings are now specified as symbolic key strings, this will eventually allow run time configurable key mappings. This introduces a bulid time dependency on libtermkey which can be found at: http://www.leonerd.org.uk/code/libtermkey/
2015-07-26vis: add infrastructure to support multiple cursors/selectionsMarc André Tanner1-1/+0
This cleans up the existing selection handling code and adds the necessary bits to eventually support multiple cursors/selections. The cursor position is kept track of using marks, which means retrieving the cursor position is no longer a constant time operation. Furthermore the terminal cursor is no longer used, instead the whole window is redrawn after every cursor movement.
2015-07-21ui: further separate curses related user interface codeMarc André Tanner1-1/+0
By now ui-curses.[hc] are the only files dealing directly with curses related functions. Integration of a proper mainloop is still pending.
2015-07-09ui: move terminal state handling code to ui specific fileMarc André Tanner1-0/+2
2015-07-09ui: move input handling code to ui specific filesMarc André Tanner1-4/+7
2015-07-06Move filename from Text to FileMarc André Tanner1-3/+3
Also apply syntax rules every time the file name changes.
2015-04-22Rename window.[ch] to view.[ch]Marc André Tanner1-1/+1
2015-04-22More renames, no functional changesMarc André Tanner1-2/+2
Win -> View, window_* -> view_*
2015-04-07Set '< and '> marksMarc André Tanner1-3/+2
2015-04-03Add option to display relative line numbersMarc André Tanner1-2/+3
:set rnu Based on a patch by Sebastian Götte.
2015-04-03Preliminary user interface separationMarc André Tanner1-0/+58
In theory only ui-curses.[hc] should depend on curses, however in practice keyboard input is still handled in vis.c. Furthermore the syntax definitions as well as keyboard bindings and selection code in window.c still depends on some curses constants. There is also a slight regression in that the window status bar does not show the current mode name. This and related global state should be eliminated in the future.