467 reputation
2617
bio website trusktr.io
location
age
visits member for 3 years, 8 months
seen Jul 9 at 1:47

trusktr.io


Oct
23
comment Mac OS X Terminal: How can I make my pico editor syntax highlight?
Don't re-learn vi, learn vim. It's so much better (you can have it behave just like vi if you want).
Oct
23
asked Is there a Metro-style app for sharing to then printing in Windows 8 store?
Oct
17
comment Smooth scrolling for vim in Mac Terminal/iTerm?
Another small (possibly negligible for some) advantage of using scrollable widgets would be that you could render a small mini-buffer similar to how Sublime does.
Oct
17
comment Smooth scrolling for vim in Mac Terminal/iTerm?
@romainl Yeah, syntax scripts seems like they could cause slow loads running on 5000 LOC. This'll be interesting to test.
Oct
13
comment Smooth scrolling for vim in Mac Terminal/iTerm?
Oh, I forgot to mention, and if you you haven't pieced it together already: these smooth animations I speak of would be pixel by pixel, not line by line. #:^)
Oct
13
comment Smooth scrolling for vim in Mac Terminal/iTerm?
(cont'd.) Lastly, but probably only the beginning, modern scrollable container widgets (like the ones in GTK3 or Qt) support inertial scrolling. Imagine being able to swipe vim with your finger and scroll it smoothly with inertia. Imagine pressing pageup or pagedown and the scrolling is animated with acceleration and deceleration.
Oct
13
comment Smooth scrolling for vim in Mac Terminal/iTerm?
(cont'd.) On the other hand, there may be plugins that rely on what's visible in the window (EasyMotion, for example, that updates the view to show you movement suggestions) and such plugins might have to do more calculations on the full length of the text when invoked. Another such example would be Signify, which would have to show git diffs in the gutter of the entire full length text (but that case probably wouldn't be too bad because Signify only uses two columns maximum, and only the rows that have changes).
Oct
13
comment Smooth scrolling for vim in Mac Terminal/iTerm?
(cont'd.) This has the potential to vastly improve vim's performance too. Think about this: every time you scroll the console vim or g/qvim windows (currently), vim has to rewrite almost every character on the screen. If the vim buffer was full length, and scrolling was handled independently by a smooth-scrolling widget, vim would only need to update one line's worth of characters at a time whenever you move the cursor to a new line (or better yet, a single character when you move forward or backward one character). This would be a HUGE performance advantage for vim!
Oct
13
comment Smooth scrolling for vim in Mac Terminal/iTerm?
(cont'd.) Window splitting could even be accomplished by duplicating vim's full-file-length output into a new widget and scrolling the widget smoothly to the appropriate position. This would all require some simple arithmetic and good knowledge of a nice widget toolkit. Window splitting (horizontal and vertical) and scrolling and resizing the widgets would be the. The rest would be a piece of cake to do (menus, tabs, things that gVim and qVim already do).
Oct
13
comment Smooth scrolling for vim in Mac Terminal/iTerm?
Hi @romainl. I wonder how vim behaves if the buffer size (windows size) is really big (i.e. the size of the whole file). GOtta test this out. Then we could put a vim buffer inside a smooth scrolling GTK (or QT) widget and scroll the entire vim buffer inside the widget smoothly. This would have the added benefit that the cursor could be easily hidden like with modern editors. When the user moves the cursor, the widget would know (using the same API gVim uses) and recenter the scroll position accordingly.
Oct
13
comment Mapping ctrl-backspace in terminator
(cont'd.) and thus adding some new escape sequence wouldn't really break much, if anything at all. It'd only add a way to distinguish ctrl+backspace for everyone!
Oct
13
comment Mapping ctrl-backspace in terminator
But unfortunately, in xterm, backspace (^H) is indistinguishable from ctrl+h (^H). Perhaps we can create a new escape sequence to be able to distinguish all three? I don't know how easy that is, but it seems like it'd be safe to do because with the current state of things (some terminals use ^? for backspace, others ^H, and vice versa) I can't imagine very many terminal apps (if any at all) consider the ctrl+backspace scenario (it'd be completely indeterministic due to the variety of terminals)...
Oct
13
comment Mapping ctrl-backspace in terminator
But can this be solved purely in the vim code base? How any code in the vim code base distinguish between backspace and ctrl+backspace if the terminal it is running in sends vim the same exact input for either key combination? Seems like this is something that must be fixed in the terminal that vim is running in, not vim. For example, Guake sends ^? for both backspace and ctrl+backspace, which makes them (AFAIK) indistinguishable. xterm, on the other hand, sends ^H for backspace and ^? for ctrl+backspace, making them distinguishable.
Oct
13
comment Mapping ctrl-backspace in terminator
@IngoKarkat See the above comment. ^
Oct
13
comment Mapping ctrl-backspace in terminator
This problem can't really be fixed in vim (AFAIK). It depends on the terminal vim is running in. For a wide variety of users using vte (Gnone Terminal, Mate Terminal, Guake, etc) this problem has gotten some recent attention and might be fixed soon. See this gnome bug: bugzilla.gnome.org/show_bug.cgi?id=420039
Oct
8
awarded  Nice Question
Oct
3
comment What's the easiest way to delete Vim swapfiles I've already recovered from?
By the way, what's the difference between quit and abort?
Oct
3
comment What's the easiest way to delete Vim swapfiles I've already recovered from?
True, but providing a simple "Recover and delete" option would be nice. It's also probably easy tom implement. I'll do it someday when I'm done going to school if it hasn't been done already.
Sep
29
answered What is the downside to Windows XP style DPI scaling in Windows 7
Sep
20
awarded  Famous Question