vim

For discussion on all things (neo)vim.
quoll 2020-06-30T16:50:13.256400Z

After using evil mode emacs for a long time, I figured I should try vim again, since I often find myself using vim in other circumstances. The problem is that I don’t really know vim. I only really know vi. I have Pathogen running, and I tried installing vim-surround.vim, vim-sexp/plugin/sexp.vim, vim-sexp/autoload/sexp.vim, sexp_mappings_for_regular_people.vim, and repeat.vim all under my ~/.vim/bundle directory. But this is where my lack of vim gets me. I don’t know how to enable any of this stuff. I had naively thought it would work when I run vim on a .clj file, but doing things like inserting a ( character doesn’t do anything special. Does anyone know how I can turn it on please?

2020-06-30T16:53:04.257100Z

try adding vim-clojure-static - that should make clojure hook in to use the lisp / sexp oriented plugins

2020-06-30T16:55:36.257500Z

there's also :set lisp which can be run in any buffer and should turn on all your lisp-specific plugins in that buffer if they are loaded

quoll 2020-06-30T16:58:46.258Z

Hmmm… is there some way I can check if any of these loaded

quoll 2020-06-30T16:59:55.259100Z

The runtimepath value is picking up all the subdirectories under ~/.vim/bundle so I figure that pathogen is working

quoll 2020-06-30T17:00:26.259700Z

and I see that omnifunc is set to clojurecomplete#Complete, so it looks like something that does Clojure stuff came in

quoll 2020-06-30T17:01:16.260200Z

But I load a .clj file and open a paren, and nothing happens. :set lisp did not change anything

2020-06-30T17:03:18.261300Z

you can try calling any : command defined by one of the plugins I guess? - if you use the new /pack/ alternative to bundle (built into vim) there's a :packadd command

2020-06-30T17:03:50.261800Z

do you just have this issue with clojure files? are any other plugins loaded?

quoll 2020-06-30T17:04:46.262200Z

I also have elm.vim and rust.vim

quoll 2020-06-30T17:05:26.263100Z

everything else is clojure stuff (which have only been added in the last 20 minutes)

quoll 2020-06-30T17:05:45.263400Z

I suppose I need to read a book on vim

2020-06-30T17:06:52.264300Z

check out :he pack - it's the thing that comes with the editor, so one less plugin to use, and has some inspectability and is well documented

quoll 2020-06-30T17:08:02.265300Z

It’s a bit of a shame. I had it installed on a previous system (just following the same directions), and I could get simple functionality. I had thought it would be easy to install the same way

2020-06-30T17:08:46.265700Z

for the basic sanity check, you've restarted vim since adding the plugins right?

quoll 2020-06-30T17:09:20.265900Z

yes

quoll 2020-06-30T17:09:41.266300Z

Is there any way to see if something from the plugins has been loaded?

2020-06-30T17:12:08.266800Z

you'll need to check the docs for pathogen for that

2020-06-30T17:12:52.267500Z

oh - s/`:he pack`/`:he packages` - that's the better doc node for the built in directory based plugin package installation

2020-06-30T17:14:15.268200Z

there's also debug-mode vim -D ... but I haven't used it, just read about it

quoll 2020-06-30T17:14:17.268400Z

OK… so I want to move everything into start directories under pack

2020-06-30T17:14:43.268900Z

that's what I'd recommend yeah, it accepts the same plugins that pathogen uses

quoll 2020-06-30T17:15:02.269300Z

OK. I’ll see what this does

2020-06-30T17:15:30.270200Z

not just pack/start pack/foo/start - I just use pack/default/start but the middle dir helps you keep things more organized

quoll 2020-06-30T17:15:46.270600Z

To be honest, I don’t know if I’m loading anything properly at all. If I’m not, then this might fix it. If I am, and it’s just not working for another reason, then this will do nothing

2020-06-30T17:16:02.270900Z

fair enough!

quoll 2020-06-30T17:16:05.271100Z

yup, I saw the suggested structure

2020-06-30T17:20:33.272200Z

I just tried vim -D for the first time - works with vim but not nvim it seems

quoll 2020-06-30T17:21:35.273100Z

OK. It seems to have loaded. I removed the pathogen infect line from .vimrc, and when I say :set then I see a whole lotta things like lispwords and indentExpr. So it must be picking things up

quoll 2020-06-30T17:21:41.273300Z

still no paredit though

2020-06-30T17:21:51.273500Z

lispwords comes with vim

quoll 2020-06-30T17:22:13.274100Z

Oh, so vim knows Clojure?

2020-06-30T17:22:13.274200Z

it gets set locally by vim-clojure-static with clojure apropriate words though

2020-06-30T17:22:33.274900Z

no, vim has an abstract concept of "a lisp" and how to behave differently with lisps

quoll 2020-06-30T17:22:40.275100Z

I’m seeing Clojure specific words in there

2020-06-30T17:22:48.275400Z

oh, then that's a good sign

quoll 2020-06-30T17:22:53.275600Z

`lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defon ce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not ,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-s tr,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test`

2020-06-30T17:23:06.276Z

perhaps you need to run the command that actually turns on vim-sexp (though I see nothing like that in my own config...)

2020-06-30T17:23:55.276600Z

perhaps vim does come with a clojure filetype nowadays - you could check by starting with no config file

2020-06-30T17:25:04.277600Z

vim -u NONE to skip init and plugins, vim -u NORC to get plugins but no vimrc

quoll 2020-06-30T17:25:33.278500Z

Well, I’m losing syntax highlighting

2020-06-30T17:25:35.278700Z

there's also the fact that vim and nvim put plugins and config in different places

2020-06-30T17:25:47.279100Z

:syntax on fixes that

quoll 2020-06-30T17:26:37.279700Z

OK… but it’s a different color scheme 🙂

2020-06-30T17:27:22.280200Z

:colorscheme ...

2020-06-30T17:27:40.280800Z

anyway, removing telling it to skip config files / plugins is a good way to get a baseline

quoll 2020-06-30T17:28:13.281100Z

It looks like packages are being loaded just fine. The issue is that neither paredit nor sexp do anything

2020-06-30T17:28:43.281500Z

are you using vim-clojure-static ?

quoll 2020-06-30T17:28:57.281700Z

I wasn’t, but then I added it

quoll 2020-06-30T17:29:37.281900Z

is it better to have it?

2020-06-30T17:30:48.282100Z

not sure, I always use it

quoll 2020-06-30T17:34:30.283500Z

I’m sort of expecting someone to say, “Oh, you have xyz set. That stops it from working.” I will then confess that I am an idiot who knows nothing about computers, and we can get on with our day 🙂

Nir Rubinstein 2020-06-30T17:35:29.283800Z

What doesn't work for you?

quoll 2020-06-30T17:36:21.284200Z

If I type ( then I don’t get a corresponding closing paren

Nir Rubinstein 2020-06-30T17:37:35.284600Z

Do you have paredit installed or just sexp?

2020-06-30T17:38:55.285200Z

I don't have paredit, and I get that behavior -

% ls ~/.config/nvim/pack/default/start 
airline         cucumber  fzf.vim  gundo         orgmode   tags       utl
airline-themes  fugitive  gnupg    ingo-library  outliner  tags-te
clojure-static  fzf       guile    neoterm       sexp      ultisnips

quoll 2020-06-30T17:39:31.285700Z

I tried paredit, but because it didn’t do that, I switched to sexp

Nir Rubinstein 2020-06-30T17:39:45.286200Z

Does vim "recognize" the filetype as clojure?

Nir Rubinstein 2020-06-30T17:39:56.286800Z

What happens when you ":set ft=clojure"

2020-06-30T17:39:57.286900Z

unless I'm reading that wrong, clojure-static and sexp are my only clojure specific plugins

quoll 2020-06-30T17:42:15.287500Z

when I say :set ft it writes:

filetype=clojure

Nir Rubinstein 2020-06-30T17:44:46.288500Z

So it recognizes the ft, but the plugins don't work? Does any other plugin not related to clojure work?

quoll 2020-06-30T17:45:44.289Z

I’ve only used plugins for syntax highlighting, so outside of that, I don’t know

2020-06-30T17:48:11.290900Z

if vim-sexp is working - run this in any buffer regardless of file type and it will cause ( to insert ()

:imap <silent><buffer> (               <Plug>(sexp_insert_opening_round)

2020-06-30T17:48:31.291700Z

if that fails to insert () or errors that sexp_insert_opening_round doesn't exist, sexp wasn't loaded

2020-06-30T17:48:38.292Z

that gets mapped by default in clojure files

Nir Rubinstein 2020-06-30T17:48:47.292100Z

That's the thing I dislike about pathogen - no feedback... Any way I can interest you in using https://github.com/junegunn/vim-plug instead? The instructions are very simple and it fetches and loads the plugins for you. Also, are you using Vim or Neovim? Which version?

2020-06-30T17:49:24.293300Z

@nirrub I already suggested moving to the built in vim plugin management...

2020-06-30T17:49:50.294300Z

I don't see why one would use a third party package for that these days

dominicm 2020-06-30T17:49:55.294400Z

Vim-clojure-static shouldn't be necessary. It's included with vim. It sounds like vim-sexp isn't loaded @quoll

❗ 1
dominicm 2020-06-30T17:50:27.295100Z

I don't think now is the time to be guessing about package managers

💯 1
2020-06-30T17:50:34.295400Z

TIL - I guess I did set up my config a very long time ago

dominicm 2020-06-30T17:50:48.296Z

@quoll how are you using pathogen?

dominicm 2020-06-30T17:51:04.296200Z

So. You can get a newer version by going direct. Keep it

quoll 2020-06-30T17:51:11.296500Z

@noisesmith got me to change to pack

dominicm 2020-06-30T17:51:14.296600Z

But minimization is better right

2020-06-30T17:51:46.297300Z

indeed - precisely why I suggested switching to the built in packaging instead of figuring out how to debug pathogen LOL

quoll 2020-06-30T17:51:47.297500Z

OK… neither of these happened

dominicm 2020-06-30T17:51:51.297700Z

😂 ok. How did you set that up?

quoll 2020-06-30T17:51:59.297800Z

I entered it, with no problems

2020-06-30T17:52:13.298Z

that's thanks to <silent> I bet, but yeah I think that proves it wasn't loaded

quoll 2020-06-30T17:53:02.298400Z

then when I went to insert mode and tried to type a ( it appeared to hang. I press Ctrl-C, and I get a screen full of:

lug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;&lt;Plug&gt;

2020-06-30T17:53:33.298800Z

um wow

Nir Rubinstein 2020-06-30T17:53:52.299300Z

And do you use vim version 8 that actually has it?

💯 1
dominicm 2020-06-30T17:55:12.300500Z

Vim 7 has it too... It's many years old.

dominicm 2020-06-30T17:55:19.301Z

Anyway, doesn't matter :)

dominicm 2020-06-30T17:55:41.301400Z

Always good to just operate at the rtp right.

quoll 2020-06-30T17:55:42.301600Z

I created ~/.vim/pack/default/start, and started putting everything in there

dominicm 2020-06-30T17:55:57.301800Z

I suspect that an entry was added for individual files instead of the whole repo

quoll 2020-06-30T17:55:58.302Z

I’m currently on Vim 8.1.2292

dominicm 2020-06-30T17:56:17.302300Z

@quoll how did you put it there

quoll 2020-06-30T17:56:23.302500Z

cp

quoll 2020-06-30T17:57:16.303400Z

Also, I removed the infect line in my .vimrc

dominicm 2020-06-30T17:57:47.304100Z

@quoll could you do find in that folder? I want to double check what you've got exactly.

dominicm 2020-06-30T17:58:07.304700Z

Probably worth running echo &amp;rtp after startup

dominicm 2020-06-30T17:58:46.304800Z

@noisesmith so, totally separate conversation, dein is faster than the package functionality

quoll 2020-06-30T17:59:33.305Z

I’ve put some vim files in directly. For some things I’ve done a git clone. So it’s messy

quoll 2020-06-30T17:59:38.305200Z

$ find . -type f
./indent/clojure.vim
./ftplugin/clojure.vim
./repeat.vim
./ftdetect/clojure.vim
./rust/indent/rust.vim
./rust/ftplugin/rust.vim
./rust/ftplugin/rust/tagbar.vim
./rust/LICENSE-APACHE
./rust/ctags/rust.ctags
./rust/test/Dockerfile
./rust/test/coverage.vader
./rust/test/vimrc
./rust/test/.gitignore
./rust/test/sample.rs
./rust/test/run-tests
./rust/syntax_checkers/rust/cargo.vim
./rust/syntax_checkers/rust/rustc.vim
./rust/ftdetect/rust.vim
./rust/plugin/rust.vim
./rust/plugin/cargo.vim
./rust/README.md
./rust/ISSUE_TEMPLATE.md
./rust/.vintrc.yml
./rust/.gitignore
./rust/doc/rust.txt
./rust/autoload/rust.vim
./rust/autoload/cargo/quickfix.vim
./rust/autoload/rust/debugging.vim
./rust/autoload/rust/delimitmate.vim
./rust/autoload/rustfmt.vim
./rust/autoload/cargo.vim
./rust/after/syntax/rust.vim
./rust/.git/config
./rust/.git/shallow
./rust/.git/objects/61/14b747b578814c81f0a7577e94e134ace03ae8
./rust/.git/objects/92/885e74f3c020f38ed5c456c36a7844c52cbe9a
./rust/.git/objects/68/bc584564015f3c173ce567f6c2c0a4c2841e1b
./rust/.git/objects/32/86ab2a84757044457ed1fbd2e11c0c026f53dc
./rust/.git/objects/51/adf5f5f74d196abfcdd1aca8bd5899b756c6c7
./rust/.git/objects/5f/e77ccb964f4011c480d7047c677985e12caada
./rust/.git/objects/9c/b1b4801ebc06bb56f85fa272488edb05e98b75
./rust/.git/objects/9c/8e6be762cc67efebbd72408a07ca8925f200f6
./rust/.git/objects/a4/7a75a22040a0ab92b4591d16ae51cd84d4839f
./rust/.git/objects/b5/d40e2f59c0d2803d6452f8bbbdf4e704719abc
./rust/.git/objects/ad/f2d4b0fe4ffba4e14cb3f80383ca2d2c3fea0f
./rust/.git/objects/d0/652ec8f4ed4ff67f1493803a01169f478061b4
./rust/.git/objects/d6/0a3d3a10a9d681af47444cc1e57ba311347744
./rust/.git/objects/d6/e51180aebb0f4a9519e7cab840889d58497bb7
./rust/.git/objects/ae/307a0bc9904a4f2c6c2469b0f57aa581d1378e
./rust/.git/objects/fc/681cc29771771526b4901db2dc189c4aeed2d5
./rust/.git/objects/fd/b2d39fb04b139fcdb9b707f9b2ccc219566632
./rust/.git/objects/e3/8d1641bd14493aac13e70a436c60339f3c4490
./rust/.git/objects/e3/75078549c39292572b07cdb7b1b7a381ae1e5f
./rust/.git/objects/c8/4c49e9aabf99b0a452dd5b6e40c7a7ddaea51a
./rust/.git/objects/fb/16fc72e081199d3e1532ea4ab89f5a94207c7d
./rust/.git/objects/4e/c13dc4e75652fc085aff4a585ead2a5fba936e
./rust/.git/objects/16/fe87b06e802f094b3fbb0894b137bca2b16ef1
./rust/.git/objects/87/de60989266eab5cc95589ca2d92ad7a6d3bc8c
./rust/.git/objects/7e/2e9fd6ee74994b8978c0612ea06dc2e23b7ac6
./rust/.git/objects/10/afd1558d87ba2d4cab58b1aa8003abfc4183b6
./rust/.git/objects/5c/d413cc37b141a54cac08b5b46b810845db287a
./rust/.git/objects/09/14f1b532a4c33c0736d09da5b40324988b2b10
./rust/.git/objects/91/192c39ff7a17ce599d56bb386b6a54e91fc51e
./rust/.git/objects/62/bfc652d52f2d0696ea9361d16690a2d71c2441
./rust/.git/objects/96/b443c87b9fe3c0a53ff567e2b086aa61e0d730
./rust/.git/objects/06/36a117f26cfc8fb55db8ff2491ff060087b935
./rust/.git/objects/99/9326978bb10914ab7f1a25deb24b320a01deeb
./rust/.git/objects/0a/56e3fc5d8cbcd1fda80cafa819b3972e27e455
./rust/.git/objects/90/be1c7cd7d823329fdb8c33de46b1370dad8843
./rust/.git/objects/d4/f474e653a877cda610a7c1b9cce585c7a245a8
./rust/.git/objects/b1/1d4181198fa7129df853322f899225de31a3ab
./rust/.git/objects/aa/ba3dacb0e3d1673cf09658612a6768f8a6f03b
./rust/.git/objects/af/b10a183009146ab083fd78157fda896a33c64e
./rust/.git/objects/a8/c63b6053bd4be47142d89fbc30eeaffba71747
./rust/.git/objects/ef/8de3e1ab22cfe06597d9b87a71541a194055c6
./rust/.git/objects/e6/9282e381bc07152cc7598f21f3162e4bbb1f22
./rust/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
./rust/.git/objects/f7/b6953c757742e077f77410fb82ae18715c9712
./rust/.git/objects/f7/f1533d40e1f4c295ec478cc6fbafa2ccfac5d7
./rust/.git/objects/fa/69300e5723165e2cff621efb266282114138f0
./rust/.git/objects/77/e28e74aa4ca27d2e28a505812bdc55b05cfc64
./rust/.git/objects/70/56d533c039d1f7739e3810ea3e563088399c5d
./rust/.git/objects/84/734e7d41d1936af04c7f7ced9f598583d84c34
./rust/.git/objects/4a/419f406c77f0de55ddfd8b718962a0e71d4410
./rust/.git/objects/25/87add766e467baf50862c795a82c718349aa2b
./rust/.git/HEAD
./rust/.git/info/exclude
./rust/.git/logs/HEAD
./rust/.git/logs/refs/heads/master
./rust/.git/logs/refs/remotes/origin/HEAD
./rust/.git/description
./rust/.git/hooks/commit-msg.sample
./rust/.git/hooks/pre-rebase.sample
./rust/.git/hooks/pre-commit.sample
./rust/.git/hooks/applypatch-msg.sample
./rust/.git/hooks/fsmonitor-watchman.sample
./rust/.git/hooks/pre-receive.sample
./rust/.git/hooks/prepare-commit-msg.sample
./rust/.git/hooks/post-update.sample
./rust/.git/hooks/pre-applypatch.sample
./rust/.git/hooks/pre-push.sample
./rust/.git/hooks/update.sample
./rust/.git/refs/heads/master
./rust/.git/refs/remotes/origin/HEAD
./rust/.git/index
./rust/.git/packed-refs
./rust/syntax/rust.vim
./rust/.travis.yml
./rust/compiler/cargo.vim
./rust/compiler/rustc.vim
./rust/LICENSE-MIT
./elm/indent/elm.vim
./elm/ftplugin/elm.vim
./elm/LICENSE
./elm/ftdetect/elm.vim
./elm/README.md
./elm/doc/elm-vim.txt
./elm/doc/tags
./elm/autoload/elm/io.vim
./elm/.git/config
./elm/.git/objects/pack/pack-91ae275cd15300b17441773c51e0de70d40299ee.pack
./elm/.git/objects/pack/pack-91ae275cd15300b17441773c51e0de70d40299ee.idx
./elm/.git/HEAD
./elm/.git/info/exclude
./elm/.git/logs/HEAD
./elm/.git/logs/refs/heads/master
./elm/.git/logs/refs/remotes/origin/HEAD
./elm/.git/description
./elm/.git/hooks/commit-msg.sample
./elm/.git/hooks/pre-rebase.sample
./elm/.git/hooks/pre-commit.sample
./elm/.git/hooks/applypatch-msg.sample
./elm/.git/hooks/prepare-commit-msg.sample
./elm/.git/hooks/post-update.sample
./elm/.git/hooks/pre-applypatch.sample
./elm/.git/hooks/pre-push.sample
./elm/.git/hooks/update.sample
./elm/.git/refs/heads/master
./elm/.git/refs/remotes/origin/HEAD
./elm/.git/index
./elm/.git/packed-refs
./elm/syntax/elm.vim
./sexp_mappings_for_regular_people.vim
./sexp.vim
./README.markdown
./surround.vim
./autoload/clojurecomplete.vim
./autoload/sexp.vim
./.git/ORIG_HEAD
./.git/config
./.git/objects/pack/pack-187a88017b0b4b80320453122bef3d8c49b437ff.pack
./.git/objects/pack/pack-e1cae023eb0b5c1cd4077d825f6e39f4503e840a.idx
./.git/objects/pack/pack-187a88017b0b4b80320453122bef3d8c49b437ff.idx
./.git/objects/pack/pack-b82e26e3bde859c755c4dff5e60baf124af7a42b.pack
./.git/objects/pack/pack-b82e26e3bde859c755c4dff5e60baf124af7a42b.idx
./.git/objects/pack/pack-e1cae023eb0b5c1cd4077d825f6e39f4503e840a.pack
./.git/HEAD
./.git/info/exclude
./.git/logs/HEAD
./.git/logs/refs/heads/master
./.git/logs/refs/remotes/origin/issue-77
./.git/logs/refs/remotes/origin/HEAD
./.git/logs/refs/remotes/origin/master
./.git/description
./.git/hooks/commit-msg.sample
./.git/hooks/pre-rebase.sample
./.git/hooks/pre-commit.sample
./.git/hooks/applypatch-msg.sample
./.git/hooks/fsmonitor-watchman.sample
./.git/hooks/pre-receive.sample
./.git/hooks/prepare-commit-msg.sample
./.git/hooks/post-update.sample
./.git/hooks/pre-merge-commit.sample
./.git/hooks/pre-applypatch.sample
./.git/hooks/pre-push.sample
./.git/hooks/update.sample
./.git/refs/heads/master
./.git/refs/tags/vim-release-011
./.git/refs/remotes/origin/issue-77
./.git/refs/remotes/origin/HEAD
./.git/refs/remotes/origin/master
./.git/index
./.git/packed-refs
./.git/FETCH_HEAD
./LICENSE.txt
./syntax/clojure.vim
./clj/vim/test-runtime.vim
./clj/project.clj
./clj/test/vim_clojure_static/syntax_test.clj
./clj/test/vim_clojure_static/indent_test.clj
./clj/bin/syntime
./clj/dev-resources/test-inherit-indent.out
./clj/dev-resources/test-reader-conditional-indent.in
./clj/dev-resources/test-multibyte-indent.txt
./clj/dev-resources/test-dispatch-macro-indent.in
./clj/dev-resources/test-basic-sexp-indent.txt
./clj/dev-resources/test-reader-conditional-indent.out
./clj/dev-resources/test-side-effects-in-indentexpr.in
./clj/dev-resources/test-dispatch-macro-indent.out
./clj/dev-resources/test-inherit-indent.in
./clj/dev-resources/test-side-effects-in-indentexpr.out
./clj/.gitignore
./clj/src/vim_clojure_static/test.clj
./clj/src/vim_clojure_static/generate.clj

dominicm 2020-06-30T18:01:34.305400Z

I think something has gone wrong here. surround.vim should be in a plugin directory

2020-06-30T18:02:08.305600Z

yeah - I try to obey occam's razor with my setup, and always considered third package management an unneeded entity :D

Nir Rubinstein 2020-06-30T18:02:18.305800Z

In my (very) humble opinion - it's just more intuitive than pack - you write the names of the plugins, issue a command, and they get installed to wherever it's needed. You get builtin nifty stuff like seeing which packages are installed, a single command to update etc. Just easier to grok IMHO (that's about vim-plug)

2020-06-30T18:02:28.306Z

but I'll consider that if my startup time gets painful

quoll 2020-06-30T18:03:04.306200Z

OK. I’ll clear it out and git clone them all from scratch

dominicm 2020-06-30T18:03:16.306400Z

If that's not a problem, that'd be good I think

2020-06-30T18:03:23.306600Z

:thumbsup: - that's a fair argument, we are discussing similar in this thread https://clojurians.slack.com/archives/C0DF8R51A/p1593539395294400

👍 1
dominicm 2020-06-30T18:03:30.306900Z

Each plugin should end up with its own directory

quoll 2020-06-30T18:04:40.307100Z

I did put them in directly. But looking now, it seems that I stuffed the moving for something. There’s at least one directory whose contents were moved rather than the directory

quoll 2020-06-30T18:04:51.307300Z

It wasn’t like that under pathogen

quoll 2020-06-30T18:09:10.307900Z

OK. I blew everything away. Copied back in my elm and rust directories

dominicm 2020-06-30T18:10:16.308800Z

Let us know if that works. I appreciate you taking time doing that again.

quoll 2020-06-30T18:10:18.309100Z

then in the .vim/pack/default/start directory I ran:

git clone <git://github.com/tpope/vim-fireplace.git>
git clone <git://github.com/tpope/vim-classpath.git>
git clone <git://github.com/guns/vim-clojure-static.git>
git clone <https://github.com/vim-scripts/paredit.vim>

dominicm 2020-06-30T18:10:32.309300Z

How's it looking?

quoll 2020-06-30T18:10:42.309600Z

Starting vim now takes about 5 seconds

quoll 2020-06-30T18:11:23.310900Z

I open a .clj file. Press o to enter insert mode. Press (. I get a ( character and nothing else

dominicm 2020-06-30T18:11:41.311300Z

That is vim-classpath. The good news is that your plugins are loading I guess.

dominicm 2020-06-30T18:12:13.312100Z

I personally wouldn't recommend vim classpath. But that's because I always start a repl anyway.

quoll 2020-06-30T18:13:23.312300Z

Happy to remove it 🙂

quoll 2020-06-30T18:14:10.313700Z

shifted it out. It starts quickly now

dominicm 2020-06-30T18:14:16.313900Z

So in this case you've selected paredit.vim, which should be providing the pair matching functionality I think.

Nir Rubinstein 2020-06-30T18:14:29.314200Z

It does provide it

👍 1
dominicm 2020-06-30T18:15:19.315Z

@quoll does :help paredit work?

quoll 2020-06-30T18:15:27.315300Z

ah. I have it now!

dominicm 2020-06-30T18:15:33.315500Z

Great!

dominicm 2020-06-30T18:15:49.315800Z

I'm glad it's working.

quoll 2020-06-30T18:16:25.316800Z

Well, now that I have one of them working… what I was seeing online was that sexp was better, due to a “repeat” issue?

quoll 2020-06-30T18:16:58.317Z

And thank you

Nir Rubinstein 2020-06-30T18:19:15.318100Z

They're different - both support s-expression level editing, but paredit tries to keep you in balance (parens wise 😉) while sexp doesn't AFAIK

quoll 2020-06-30T18:19:40.318300Z

Ah, OK. Thank you

👍 1
oxalorg (Mitesh) 2020-06-30T18:23:09.322700Z

Hey guys. I'm new to Clojure, trying to setup vim. So far I have it working with nREPL + conjure plugin. What other plugins would be essential to easily modify parens/edit text?

Nir Rubinstein 2020-06-30T18:23:18.323100Z

BTW - I have colleagues that swear by parinfer, but it's really not for me (keeps parens balanced by level of indentation)

dominicm 2020-06-30T18:23:19.323300Z

I would say that vim-sexp is better. They keep you balanced but in different ways. Vim-sexp gives you tools to modify sexpr in a way that keeps them balanced. Paredit overrides vim built ins to try and automatically keep things in balance. The paredit model is very emacsy, and the sexp model is very vimy. I'd say paredit is easier to start with, but sexp is more powerful long term.

💯 1
dominicm 2020-06-30T18:23:41.323800Z

^ @mitesh applies to you too :)

🎉 1
oxalorg (Mitesh) 2020-06-30T18:24:01.324Z

Yeah was just reading up on it haha! Thanks

Olical 2020-06-30T18:24:18.324400Z

+1 for vim-sexp

quoll 2020-06-30T18:25:06.325600Z

I might need to make the shift to vim-sexp, as I can’t get slurp or barf to work (I really wish there were better names for those)

Nir Rubinstein 2020-06-30T18:25:32.326200Z

leader and > (that is shift+.) - while standing on the parentheses

Olical 2020-06-30T18:26:37.328100Z

Also vim-sexp-mappings-for-regular-people or whatever it's called

2020-06-30T18:27:04.328700Z

to elaborate on vim-sexp: "paredit" tries to act like the emacs plugin of the same name, and offers the same operations, "vim-sexp" uses the vim native concept of "text objects" so that you can use the same thinking process editing a lisp as any other structured input in vim

👍 2
quoll 2020-06-30T18:28:19.329Z

and leader is \ by default, right?

Nir Rubinstein 2020-06-30T18:28:29.329200Z

Yup

dominicm 2020-06-30T18:28:59.330300Z

On mobile, so tried to keep it short. But yeah, there's a whole blog post in comparing the approaches.

Nir Rubinstein 2020-06-30T18:29:48.330500Z

the &lt; or &gt; denote the direction the parentheses will move when you issue the command. So, they'll either slurp or barf - depends if you're on the opening parens or the closing one

quoll 2020-06-30T18:29:48.330700Z

apparently not. But, I just added:

let mapleader="\\"
to my ~/.vimrc and now it works

Nir Rubinstein 2020-06-30T18:29:54.331Z

:thumbsup:

quoll 2020-06-30T18:30:10.331500Z

No idea what the leader was when I wasn’t setting it. I couldn’t figure it out

2020-06-30T18:30:34.332Z

also, for anyone using vim but not thinking in terms of text-objects yet, I highly recommend spending a few hours on it, it was a massive level up in my vim usage

2020-06-30T18:32:11.333600Z

good rule of thumb, if you use h/j/k/l for all your movement and backspace to make changes, text-objects could change your life

nate 2020-06-30T18:35:32.334100Z

vim learning levels: 1. disable arrow keys 2. disable hjkl

➕ 1
quoll 2020-06-30T18:38:50.334800Z

Huh. I got a bit confused for a while there. There is no default leader on the mac

2020-06-30T20:21:39.335100Z

3. disable insert, replace, tabs, and visual modes or maybe that's -1

nate 2020-06-30T20:22:29.335300Z

oh man, that's pretty far

nate 2020-06-30T20:22:38.335500Z

I haven't even gone to level 2 yet

oxalorg (Mitesh) 2020-06-30T20:24:41.336400Z

paredit seems quite confusing, it's not letting me delete parens, or add/wrap new ones easily (my bad at not having read :h paredit but I thought it would be intuitive enough, guess not). I think I'll just disable it for now until I'm more familiar with clojure

snoe 2020-07-02T15:51:08.342500Z

vim-sexp is a less restrictive paredit too

2020-06-30T20:29:31.336700Z

in all honesty I use all these things, but I rarely touch the arrow keys (I found it handy to bind the arrows to the vim-sexp "weird" operations)

🚀 1
nate 2020-06-30T20:44:40.336900Z

oh interesting

dave 2020-06-30T21:53:34.337200Z

one thing i like about vim-plug is that it updates all the plugins in parallel, instead of iterating through them one by one i haven't tried the built in vim package manager, so for all i know, it does that too, but i would guess that it probably doesn't

dave 2020-06-30T21:54:04.337400Z

if you only have a handful of plugins, then it doesn't matter. i'm on the "vim as an IDE" side of the spectrum, though, and i have dozens of plugins

2020-06-30T21:55:28.337600Z

by updating do you mean it is looking for newer versions?

dave 2020-06-30T22:06:17.337800Z

yeah, basically doing a git pull in the repo for each plugin

2020-06-30T22:08:54.338Z

I don't think the builtin even has that functionality (I can imagine how I'd implement it I guess) - I've never been the type to blindly update versions of anything in my dev toolchain though (bit hard by CIDER years ago and still shy)

dave 2020-06-30T22:41:43.338300Z

that's fair

dave 2020-06-30T22:42:03.338500Z

it all depends on your philosophy. i have a recurring reminder that i set for myself to update all of my vim plugins and apt-get packages twice a week

dave 2020-06-30T22:42:50.338700Z

every now and then i get bit by a breaking change, but i figure things don't typically change much within a few days, and it isn't too annoying to work through these small sorts of breaking changes

dave 2020-06-30T22:43:10.338900Z

vs. waiting months/years and then updating and facing potentially lots of big breaking changes

dave 2020-06-30T22:43:42.339100Z

i can definitely understand the "never update" philosophy that a lot of people have though

dave 2020-06-30T22:44:35.339300Z

if you have a set of package versions that are working for you, and you don't have a compelling reason to update, then why bother?

2020-06-30T22:47:54.339500Z

mind you, for things I deploy at work, we have strict security rules and enforced updates based on CVEs

2020-06-30T22:48:03.339700Z

but that doesn't really effect my local dev stack so much