This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-18
Channels
- # announcements (17)
- # babashka (42)
- # beginners (34)
- # calva (78)
- # cherry (1)
- # cider (7)
- # clojure (64)
- # clojure-europe (19)
- # clojure-nl (2)
- # clojure-norway (54)
- # clojure-uk (3)
- # clojurescript (21)
- # cloverage (1)
- # conjure (1)
- # core-async (11)
- # cryogen (16)
- # cursive (1)
- # data-oriented-programming (1)
- # datahike (5)
- # fulcro (2)
- # girouette (1)
- # helix (10)
- # hyperfiddle (1)
- # jobs (1)
- # kaocha (4)
- # nbb (7)
- # off-topic (6)
- # pathom (4)
- # polylith (21)
- # rdf (9)
- # releases (2)
- # shadow-cljs (3)
- # sql (12)
- # squint (68)
- # vim (33)
- # xtdb (29)
Anyone use vim fugitive? I'm trying to know how to view the diffs for only the file loaded into my buffer. Doing Git diff
shows the diffs for everything changed in the repo.
I use cli and there I paste the filename like this:
git diff HEAD~1 my-file.txt
I don't know if this helps
Also it also works with git diff
but sometimes you want to see several commits back and you can specify HEAD~2
etc.
Oh, you can also use :Git diff %
for the current buffer if you don’t like the :Gdiffsplit
split view.
I access it quite often from the Gstatus
window, press dd
when hovering over one of files there
If you use gitgutter
this is a default binding as well for lookning at diffs per hunk : nmap <Leader>hp <Plug>GitGutterPreviewHunk
Also cv
(or cva
for amend) in the gstatus
window of fugitive will output a verbose diff for all changes to be committed below your commit message.
> I access it quite often from the Gstatus
window, press dd
when hovering over one of files there
What is extremely useful to someone who likes to keep commits as small as possible, without breaking the code, this diff view allows you to directly edit the staged file. That means you can stage sub-line level changes.
I don't think Gstatus works on later versions of vim fugitive (at least, doesn't work for me)
I know this isn’t the answer to the question you asked, but a nice git ui for neovim is lazygit https://github.com/kdheepak/lazygit.nvim I use this for all my git tasks. I only use vim fugitive to do git blames XD
Going to give https://github.com/yatli/fvim a try, since it's the existing solution I could find to having multiple OS windows attached to the same nvim instance.
> "try Ctrl-w ge
to detach a window into a separate OS window!"
So far just spun up a quick REPL to test, detached that REPL window, and started a web server (via an integrant system). Everything works as expected.
It's interesting that you can switch windows with vim commands: <C-w><C-w>
cycles through vim windows in both OS windows. With focus following along properly.
Only slight limitation is that the separate OS window is (only) a vim window; it doesn't have its own cmd-line (if you type :
in the detached window, it opens the cmd-line in the main window), and you can't split it up further.
So it's not a completely separate "client" connecting to the same vim server, as I originally wanted. But it's mitigated by the fact that you can detach multiple windows.
I'm really just looking for a solution to having my vim session split over multiple monitors. Being able to have my nREPL and (especially) Conjure buffer on a separate screen will be a significant improvement already.