-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delimiters between items in the stdout buffer? #421
Comments
@mars0i Thanks for your suggestion!
Me too.
Other than So, for example, if we add a delimiter after a certain time has elapsed since the last append, we can add a delimiter to print statements, including Currently, the time to add delimiters is set to 500 ms, but it can be customized by vim-iced/autoload/iced/buffer/stdout.vim Lines 21 to 22 in eb77d53
|
@liquidz, so far, this works very well. Thank you! I don't mind delimiters between print statements, either. I experimented with changing the delay time, making it larger and smaller, and it seems to work the way that one would expect. This seems like a good solution to me, because if someone doesn't want delimiters at all, they can set |
Not a problem for me. I'm grateful that you put out releases as often as you do. |
I love that
iced_print_last
pretty-prints data, including syntax highlighting, by the way.When using Clojure to generate or manipulate data, I repeatedly display data structures using
iced_print_last
. For example, might display a vector of pairs of doubles, and then display a vector of pairs of doubles that is a transformed version of the first vector. This means that one vector is immediately below the other, and it can be visually difficult to see immediately where one ends and the next begins. This is especially true if the vectors are large, and I am scrolling quickly to find out where the second vector starts.Similarly, if I cause an error, so that there's a stacktrace in the stdout buffer, and then cause another error, I will quickly scroll up to find the beginning of the second error. It would be easier to find this if there was a break between the stacktraces.
For the first case, in my local copy of autoload/iced/nrepl/eval.vim, I added
"----\n" .
to the linein the definition of
iced#nrepl#eval#print_last()
. This is much nicer for me; I can see where the data structures start and end now. (I don't know why simply adding"\n" .
doesn't have any effect.)(I haven't tried to figure out how to do something similar with stacktraces, but I am more concerned with displaying data.)
That solves my problem, but now I might have to add the "----" visual delimiter again if the release version of eval.vim is changed.
I don't know whether there are other people who would like to be able to insert a blank line or other delimiter between items in the stdout buffer. Not everyone would like that, I think, because (a) it uses up screen space, and (b) it could be confusing if someone runs
println
,prn
, etc., and they don't know whether what is added to the stdout buffer comes from their print statements or something that vim-iced is adding. So I am not arguing that vim-iced should always insert a blank line or some delimiter text between items in the stdout buffer.In my case I don't mind wasting the extra screen space, and I am not worried about being confused about print statements.
What do you recommend, @liquidz ? Do you think it would be worth adding a user configuration to add a delimiter between items in the stdout buffer? I would like that, personally, but if no one else would use such a feature, then maybe it would clutter up the vim-iced source code. It's not always good to add new features.
(If any other vim-iced users read this issue, perhaps they will have comments.)
The text was updated successfully, but these errors were encountered: