aboutsummaryrefslogtreecommitdiff
path: root/vis.c
AgeCommit message (Collapse)AuthorFilesLines
2016-04-21vis: add infrastructure to register custom :-commandsMarc André Tanner1-0/+1
2016-04-21vis: do not lazy allocate :-commandsMarc André Tanner1-0/+2
The built in commands should always be available.
2016-04-20vis-lua: trigger start event after ui has been initializedMarc André Tanner1-1/+3
2016-04-20vis: handle termination from within win_open event gracefullyMarc André Tanner1-3/+2
2016-04-18vis: use internal file to show lua errorsMarc André Tanner1-0/+3
This means no event handlers are run for it, hence there is no chance for recursive errors.
2016-04-18vis: do not run event handlers for internal filesMarc André Tanner1-3/+3
Should have been part of f50465312dbb7e8fcb2409aa691d1aea7a43c466.
2016-04-17vis: remove mapping from ' ' to <Space>Marc André Tanner1-1/+1
This reverts part of bd1d849b2033b04a372542c59d458d4f8279c937 just use a literal space within your key mappings. Close #280
2016-04-15vis: calculate auto indent for all cursors individuallyMarc André Tanner1-6/+9
2016-04-15vis: do not run registered event handlers for internal filesMarc André Tanner1-1/+1
This fixes interactive :-commands when the user has configured to set custom options vis:command(...) via the Lua win_open event handler. The problem was that the creation of the window for the command prompt would itself trigger an execution of a :-command. Upon successful completion the editor would switch to normal mode. Therefore the interactively entered command would not be applied to the correct range.
2016-04-14vis: allow mapping of <Space>Marc André Tanner1-1/+1
One should generally use <Space> in mappings: :map! normal <Space> h except for insert/replace mode where a literal space has to be used: :map! insert " " foo
2016-04-13vis: stop repeated motions as soon as resulting position remains the sameMarc André Tanner1-1/+2
This improves responsiveness of {count}j for files with less than count lines. For huge files this will still be slow because the code tries to restore cursor position on every line before moving on to the next. Also moving up will generally be slower than downwards. Use {count}% (fastest) or or :count (slower) instead. Close #267
2016-04-08vis: let :e recreate a window at the same location as the old oneMarc André Tanner1-0/+29
Close #224
2016-04-08vis: cleanup window focusing codeMarc André Tanner1-8/+13
2016-04-06vis: fix vi filter operators ! and =Marc André Tanner1-4/+2
2016-04-03vis: change vis_pipe API and cleanup related codeMarc André Tanner1-5/+5
2016-04-03sam: unify vi(m) and sam command lineMarc André Tanner1-1/+187
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-03-30array: allow arbitrarily sized array elementsMarc André Tanner1-0/+2
There exist two typical ways to use an array: 1) to hold pointers to externally allocated memory regions Use array_init(...) for initialization, an element has the size of a pointer. Use the functions suffixed with `_ptr' to manage your pointers. The cleanup function array_release_full must only be used with this type of array. 2) to hold arbitrary sized objects Use array_init_sized(...) to specify the size of a single element. Use the regular (i.e. without the `_ptr' suffix) functions to manage your objects. array_get will return a pointer to the object stored within the array.
2016-03-28vis: cleanup usage of vis_cursors_countMarc André Tanner1-1/+1
2016-03-25vis: remove __DATE__ and __TIME__ references to aid with reproducible buildsMarc André Tanner1-1/+1
2016-03-23Remove identically replicated copyright comments from source filesMarc André Tanner1-15/+0
2016-03-15vis: do properly replay ": and "/ registersMarc André Tanner1-0/+7
This makes @: (and @/) work.
2016-03-15vis: slightly cleanup register related codeMarc André Tanner1-1/+1
2016-03-13vis: convert gn and gN text objects to use "/ register contentMarc André Tanner1-3/+0
2016-03-12vis: overhaul search related code, support "/ registerMarc André Tanner1-0/+14
2016-02-25vis: use standard registers for macro recordingsMarc André Tanner1-11/+13
Also support upper case register to append to an existing macro.
2016-02-21Cleanup new line insertion codeMarc André Tanner1-10/+1
2016-02-18Add infrastructure to register custom text object functionsMarc André Tanner1-2/+5
2016-02-18Add infrastructure to add custom motion functionsMarc André Tanner1-0/+3
A motion function can be registered with vis_motion_register(...) the returned id (if non negative) can then be used as an argument to vis_motion(...)
2016-02-18vis: add insfrastructure to support global key mappingsMarc André Tanner1-0/+12
Except for insert/replace mode keys get translated before any key bindings are evaluated. This is useful for non-english/latin keyboard layouts.
2016-02-13Convert call sites of text_line_char_{get,set} to text_line_width_{get,set}Marc André Tanner1-3/+2
2016-02-12vis: respect window local mappings for child modesMarc André Tanner1-16/+10
Since commit 197ab824206335eab7ceed774ddeccac18fafc09 visual line and replace modes are child modes, hence we also have to consider the window local key bindings of their respective parent modes. For example in replace mode the key lookup chain is now as follows: window local replace mode -> global replace mode -> window local insert mode -> global insert mode This fixes <Enter> behaviour in prompt for replace and visual line modes.
2016-02-12Mark some tables as constMarc André Tanner1-1/+1
This allows them to be placed into the read only ELF section.
2016-02-12Improve large file supportMarc André Tanner1-0/+11
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-02-11vis: add support for different kind of text objectsMarc André Tanner1-3/+10
Up until now text objects would only ever grow/expand if applied multiple times. The new SPLIT type allows text objects which cover a completely different range when applied with a count.
2016-02-10vis: simplify modes implementationMarc André Tanner1-0/+2
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-02-07vis: export vis_window_closableMarc André Tanner1-0/+10
2016-01-30Implement "A - "Z registersMarc André Tanner1-1/+8
2016-01-30Implement system clipboard registers "* and "+Marc André Tanner1-1/+2
Both registers are currently treated identically. The actual system integration is performed by two shell scripts vis-copy and vis-paste.
2016-01-30Implement blackhole register "_Marc André Tanner1-0/+1
2016-01-30Cleanup register implementationMarc André Tanner1-2/+3
2016-01-30Improve Lua error reportingMarc André Tanner1-2/+5
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-28vis: factor out common code to create internal fileMarc André Tanner1-6/+11
2016-01-28vis: clean up count handlingMarc André Tanner1-9/+15
There are cases where zero can also be a legitimate count.
2016-01-20vis: further improve selection restore codeMarc André Tanner1-0/+6
This is still not 100% correct for all possible cases, but should work for those currently used by vis e.g. the shift left operator.
2016-01-19vis: improve selection restore `gv`Marc André Tanner1-0/+11
2016-01-14vis: use different default register when editing a prompt fileMarc André Tanner1-3/+3
2016-01-14vis: move prompt handling to separate fileMarc André Tanner1-175/+3
2016-01-14vis: more cleanupsMarc André Tanner1-4/+0
2016-01-14vis: s/moves/vis_motions/gMarc André Tanner1-1/+1
2016-01-14vis: s/ops/vis_operators/gMarc André Tanner1-6/+6