aboutsummaryrefslogtreecommitdiff
path: root/editor.h
AgeCommit message (Collapse)AuthorFilesLines
2015-07-31vis: cleanup handling of charwise/linewise motionsMarc André Tanner1-2/+1
Also text objects in visual mode should now work better.
2015-07-28vis: pass cursor to operator implementationsMarc André Tanner1-0/+1
2015-07-26vis: add infrastructure to support multiple cursors/selectionsMarc André Tanner1-2/+1
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-3/+2
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-19vis: handle file truncation more gracefullyMarc André Tanner1-0/+4
If we use the file / virtual memory system as cache (using mmap(2)) and another process truncates the file we are editing, we have a problem. All we can do is catch the resulting SIGBUS, close the corresponding window and print a warning message. To test this use: $ dd if=/dev/zero of=TEST bs=8M count=1 $ vis TEST :! echo TRUNCATE > TEST
2015-07-19text: move regex related functions to separate fileMarc André Tanner1-0/+1
Eventually this should probably be rewritten to use an iternal regex engine, currently it has unacceptable memory usage, it copies the whole text.
2015-07-11vis: rename struct member to avoid conflict with standard libraryMarc André Tanner1-1/+1
Closes #60
2015-07-09ui: move input handling code to ui specific filesMarc André Tanner1-5/+0
2015-07-06Warn when saving a file which has been changed outside the editorMarc André Tanner1-0/+1
2015-07-06text: remove text_load_fd and text_fd_getMarc André Tanner1-1/+1
2015-07-06Move filename from Text to FileMarc André Tanner1-2/+4
Also apply syntax rules every time the file name changes.
2015-06-30Cleanup insert/replace mode input handlingMarc André Tanner1-3/+3
View should only display the file content, but not modify it.
2015-05-17Filter command :!Marc André Tanner1-0/+2
If no range is given then stdin is passed through which allows interactive usage as in :!ls -1 *.c | slmenu For this to work the command needs to use stderr for its user interface and write any data for vis to stdout.
2015-05-16Release macro dataMarc André Tanner1-1/+3
2015-04-29Make operators return new cursor positionMarc André Tanner1-1/+1
2015-04-22Rename window.[ch] to view.[ch]Marc André Tanner1-2/+2
2015-04-22Yet more renames (EditorWin -> Win)Marc André Tanner1-17/+17
2015-04-22More renames, no functional changesMarc André Tanner1-3/+3
Win -> View, window_* -> view_*
2015-04-22More renaming vis->win->view instead of vis->win->winMarc André Tanner1-1/+1
2015-04-22Better variable naming (VisText -> File)Marc André Tanner1-7/+7
Therefore vis->win->text->data becomes vis->win->file->text.
2015-04-21Cleanup implementation of movements to marksMarc André Tanner1-4/+2
2015-04-21Implement ';' and ','Marc André Tanner1-0/+1
This fixes #45
2015-04-21Clean up to/till movementsMarc André Tanner1-1/+1
2015-04-11Eliminate global running variableMarc André Tanner1-0/+1
2015-04-11Remove global mode stateMarc André Tanner1-0/+3
Once again show mode in window status bar.
2015-04-11Move structs to editor.h remove global action{,_prev}Marc André Tanner1-0/+115
2015-04-11Eliminate global state for repetition of last modificationMarc André Tanner1-0/+1
2015-04-11Eliminate global state for :set optionsMarc André Tanner1-0/+1
2015-04-11Lazy initialization of :-commandsMarc André Tanner1-0/+2
2015-04-07Set '< and '> marksMarc André Tanner1-0/+1
2015-04-05Remove unused struct memberMarc André Tanner1-1/+0
2015-04-05Introduce new struct VisTextMarc André Tanner1-16/+27
This adds yet another layer of indirection and stores vi related stuff which is associated with a given text but shared among all windows displaying it (e.g. marks). This will also help if one wants to keep texts arround which aren't currently displayed.
2015-04-03Preliminary user interface separationMarc André Tanner1-24/+15
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.
2015-01-06Rudimentary change list (accessible via g; and g,)Marc André Tanner1-0/+9
2015-01-04implement rudimentary autoindentMatthias Braun1-0/+1
2015-01-01Add rudimentary support for jump list (CTRL+{O,I})Marc André Tanner1-0/+7
2014-12-18Macro supportMarc André Tanner1-0/+3
At some point this should be optimized further at the moment there is some 20 byte overhead for each entered key.
2014-10-24Make command prompt available in visual modesMarc André Tanner1-2/+2
2014-10-17Read stdin when given - as filenameMarc André Tanner1-0/+1
2014-09-24Change split/vsplit APIMarc André Tanner1-4/+5
2014-09-22Add support for the '<', '>' marksMarc André Tanner1-0/+2
2014-09-19Implement expand tab functionality, make tabwidth configurableMarc André Tanner1-0/+6
If expandtab is enabled then inserted tabs are replaced by tabwidth amount of spaces. Both settings apply to all windows files and can be changed via: :set tabwidth n # where 1 <= n <= 8 :set expandtab (1|yes|true)|(0|no|false)
2014-09-18Clean up window splitting APIMarc André Tanner1-7/+7
2014-09-15More efficient syntax highlighting, first match winsMarc André Tanner1-3/+1
2014-09-12Cleanup editor.hMarc André Tanner1-5/+5
2014-09-12Add facility to display a message to the userMarc André Tanner1-0/+5
2014-09-12Add some more API commentsMarc André Tanner1-2/+7
2014-09-11Add :edit commandMarc André Tanner1-0/+2
2014-09-11Add :qall commandMarc André Tanner1-1/+1
2014-09-10Fix :q commandMarc André Tanner1-1/+0