Comments (5)
I'm working on finding a solution here. I think a sensible approach is to use filetype=git
for diff
buffers.
We already use it for git show
buffers which are not much different.
from kakoune.
proposed fix is at https://lists.sr.ht/~mawww/kakoune/%[email protected]%3E (it serves a larger series but can be extracted)
from kakoune.
I think it makes sense to map <ret>
depending on filetype, not based on which commands where executed to create the buffer.
Note that for git diff
we set filetype diff
but override the generic diff <ret>
mapping with one that always uses the Git toplevel dir (not terribly important though).
In future, git
commands might set buffer-local variables for the $PWD
(so things work better when there are multiple Git worktrees). So hand crafting a buffer might have some minor downsides.
I like to save my search results in a file with :w grep-controllers. Then to reuse those results, I just open the file and assign it the grep filetype with set buffer filetype grep
you can use :rename-buffer
on the *grep*
buffer instead
from kakoune.
you can use :rename-buffer on the grep buffer instead
That is a nice tip (as long as you don't want to persist it to disk.
I think it makes sense to map depending on filetype, not based on which commands where executed to create the buffer.
I feel like it would be good practice too.
from kakoune.
I think that could be effectively a good idea and could lead to a cleaner approach.
from kakoune.
Related Issues (20)
- [REQUEST] Rotate values from registers when pasting HOT 6
- [REQUEST] Incremental buffer synchronisation with coprocess (unidirectional)
- [QUESTION]: `:new` command gives an error `'terminal': no such command` when using Kakoune with Alacritty HOT 12
- [QUESTION]: hook gives different results when the same keystrokes are splitted to two `execute-keys`. Why? HOT 2
- [QUESTION] Cursor position independent way to select word under the cursor HOT 1
- [REQUEST] make <c-c> capturable with RawKey hook HOT 4
- [BUG] Garbage instead of Cyrillic text when connecting to Kakoune server launched as a daemon using `launchd` HOT 4
- goto and view keybindings don't work properly when there is a wrap highlighter [BUG] HOT 2
- [BUG] Python filetype does not allow paragraphs in block comments.
- [REQUEST] add more details to `:debug mappings` and/or provide an additional command that shows all bindings HOT 5
- [REQUEST] Creating undo groups in Normal mode HOT 3
- [REQUEST] Add "right hand side" mapping to `:debug mappings` HOT 4
- [BUG] Backspace occasionally behaves like Delete HOT 24
- [QUESTION] Remote Events aync ?
- [BUG][CRASH] ctags-search crashes kakoune after trying to browse autocomplete options. HOT 2
- [BUG] %val{buflist} does not produce quoted output by default HOT 1
- [BUG] :w write paste wl-clipboard contents HOT 4
- [BUG] mv operation should not interfere with HOT 3
- [QUESTION] Text file busy make: *** [Makefile:181: install] Error 1 HOT 1
- [QUESTION] Cursor up/down navigation in soft-wrapped text (gj/gk in Vim) HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kakoune.