This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-04
Channels
- # announcements (123)
- # asami (1)
- # babashka (50)
- # beginners (49)
- # biff (21)
- # calva (48)
- # cider (6)
- # clj-yaml (8)
- # cljsrn (2)
- # clojure (9)
- # clojure-conj (1)
- # clojure-indonesia (1)
- # clojure-losangeles (1)
- # clojure-uk (18)
- # clojurescript (21)
- # data-science (19)
- # datahike (13)
- # events (1)
- # fulcro (1)
- # honeysql (4)
- # hyperfiddle (40)
- # improve-getting-started (3)
- # inf-clojure (1)
- # malli (6)
- # off-topic (45)
- # releases (3)
- # rewrite-clj (14)
- # scittle (1)
- # shadow-cljs (57)
- # tools-deps (1)
- # vim (13)
- # xtdb (14)
In my setup, gqi"
and gwi"
do nothing, but other similar commands, such as gqip
, do work. This is true both in nvim 0.7.2 and in vim 8.2.3455 and 9.0. I thought it might have something to do with an option in my startup files, but if I turn them off completely, the problem continues. Any suggestions about what/how to investigate? (In case it matters, this is on MacOS 12. I haven't tested as systematically on MacOS 13, but I believe that the problem is the same there.)
I've tested on mac and linux, vim and nvim, but can't replicate. First, do vi"
and make sure that text object actually works before doing gq
. If it still doesn't work, do :set formatexpr?
and :set formatprog?
to make sure those aren't set to something which is failing. If they are, you'll need to investigate the expression/program causing the problem. Or set to default value with :set formatexpr&
etc. and see if that works.
Thanks @tomd. That's very helpful.
tl;dr: Please scroll down to my last reply.
When I type vi"
, it seems to ignore the i
and whatever is the next character, leaving vim/nvim in Visual mode, responding to motion commands or Esc
only after that first character after i
. Or rather, the character after i
causes an error bell. (Didn't notice that at first because I have my terminal set to visual bell.) The same thing happens with va
. I'm using a visual bell, and didn't notice that I'm getting a bell from the character after i
or a
. For example, vijj
So there is something special that's happening with the i
or a
in vi
and va
, but it's nonfunctional, since the next character doesn't do anything. formatexpr
and formatprg
seem to be empty, but I gather that the problem comes before that step. This is even if I rename config files so that I'm just running out-of-the-box vim or nvim.
As an experiment I tried vi"j
with vim -V9foo.log textfile.txt
to try to see what is happening with the character after vi
. I don't know how to read this log file, but I'm guessing that the relevant part is contained in these lines:
Executing BufWinEnter Autocommands for "*"
autocommand call s:Highlight_Matching_Pair()
Executing BufEnter Autocommands for "*"
autocommand sil call s:LocalBrowse(expand("<amatch>"))
Executing VimEnter Autocommands for "*"
autocommand sil call s:VimEnter(expand("<amatch>"))
Executing CursorMoved Autocommands for "*"
autocommand call s:Highlight_Matching_Pair()
-- VISUAL --
Executing CursorMoved Autocommands for "*"
autocommand call s:Highlight_Matching_Pair()
Nothing there looks like an error, to me, but the bell is being rung.OK, this is interesting. When I open foo.log or .viminfo in vim or nvim, vi"
works! But it doesn't work in my txt file, or clj files.
Um, maybe I have created confusion by me misunderstanding what the i"
is supposed to do. Oops! vi"
and gqi"
do work for me if the quotation marks are on one line.
If that is what they are supposed to do, then I am not having a problem getting gqi"
and gwi"
to work. (But that's not what I need. I want to reformat docstrings that already are broken across multiple lines. So I'll try a different strategy from the suggestions in the earlier thread.)
the i"
motion does only work on one line, but many people will have installed plugins to extend that to multiple lines. I use https://github.com/wellle/targets.vim
Thanks @U02EP7NKPAL I had forgotten about that. Sorry for the confusion @U4HSMRQQJ - I do most of my vimming in Emacs' evil mode which also enables multiline i"
. The examples I tested in vim and nvim were single line. Glad it's now resolved
Thanks @U02EP7NKPAL. Excellent. I thought I'd need to code up a little script myself, but I'd rather use something off the shelf that someone else has made. It's less likely to interfere with something I install at some future date than my own code would--because only I use it. No problem @tomd --and quite understandable, of course. You set me on the right path.
Is there any magical way to highlight parentheses before the cursor without using any plugins? Unfortunately, vim-matchup
has broken.
Thanks @tomd. That's very helpful.
tl;dr: Please scroll down to my last reply.
When I type vi"
, it seems to ignore the i
and whatever is the next character, leaving vim/nvim in Visual mode, responding to motion commands or Esc
only after that first character after i
. Or rather, the character after i
causes an error bell. (Didn't notice that at first because I have my terminal set to visual bell.) The same thing happens with va
. I'm using a visual bell, and didn't notice that I'm getting a bell from the character after i
or a
. For example, vijj
So there is something special that's happening with the i
or a
in vi
and va
, but it's nonfunctional, since the next character doesn't do anything. formatexpr
and formatprg
seem to be empty, but I gather that the problem comes before that step. This is even if I rename config files so that I'm just running out-of-the-box vim or nvim.