bew / dotfiles Goto Github PK
View Code? Open in Web Editor NEWAll my dotfiles in one place!
All my dotfiles in one place!
I need to rerpoduce a bug I have when I switch to another tab (maybe from insert, from an active snippet) and ultisnips freeze and eats all my RAM...
Maybe related: SirVer/ultisnips#1187 (I need it to be resolved as well)
Great example: https://github.com/holman/dotfiles
(but I'll do my own, because why not! (And I always use my own stuff...))
let g:vim_markdown_conceal = 0
let g:vim_markdown_conceal_code_blocks = 0
As documented here:
https://github.com/tpope/vim-markdown
g:markdown_fenced_languages
should be available out of da box
When opening a git commit message buffer, the plugin committia.vim opens the diff of the commit in a split.
But for some operations that diff is not accurate (when using --amend, or on the commit edition of a rebase 'squash' operation (not sure I can do anything about it in that case), or on a merge)
https://github.com/romgrk/winteract.vim
(looks like the system of keybinding is quite generic, not only for windows?)
Given these snippets (for ultisnips files)
snippet vis "VISUAL placeholder with default value" w
\$\{VISUAL${1:${2:default}${3:/${4:transform}/}}\}
endsnippet
snippet n "Numeric placeholder with default value" w
${$1:$2}
endsnippet
(TODO: try to reduce snippets code to minimal that still reproduce the bug)
Given:
<tab>
is the snippet expansion binding<next>
selects the next placeholder[abc]
means abc
is the selected text (in select mode)ab[]c
the cursor is between b
and c
(in insert mode)Doing the following actions:
n<tab>1<next>vis<tab><backspace><next><next><next>
Here is what I see at each step:
n<tab>
${[]:}
(in snippet n)1<next>
${1:[]}
(in snippet n)vis<tab>
${1:${VISUAL[default/transform/]}}
(in snippet vis)<backspace><next>
${1:${VISUAL}[]}
(in snippet vis ? or snippet n ?)<next>
(I want to get out now!)${1:[${VISUAL}]}
(:warning: this is unexpected... Still in snippet n ?)<next>
(I guess I'm still in snippet n, I want to get out now!)${1:j}
(note: Alt-j
(<M-j>
) is my <next>
snippet; and now I'm not in a snippet anymore as subsequent Alt-j
goes to the next line like a <esc>j
would do when not in a snippet)<next>
? How do I get out then ?I wanted: ${1:${VISUAL}}[]
([]
is the cursor in insert mode)
Would also be nice to re-impl the leader>e
shortcut to edit the current code block in a separate window (to have snippets, etc..), it was present in a markdown plugin I used for a while.
Originally posted in #19 (comment)
vim & neovim now natively supports packages of plugins:
https://neovim.io/doc/user/repeat.html#packages
This seems to allow faster plugin loading on startup and simpler/cleaner (how so? native-to-vim?) plugin handling (instead of only relying on runtimepath
mutations).
The idea of pack
based plugin managers is that the manager is a vim pack, which manages a bunch of plugins
https://github.com/kristijanhusak/vim-packager
https://github.com/k-takata/minpac
motivation: justinmk moved to it! and it claims to be faster
https://www.reddit.com/r/neovim/comments/d4rdc0/what_new_configurations_have_you_added_in_your/f0ggn6t/
Plugpac: as thin wrapper around minpac to have a near vim-plug experience:
https://github.com/bennyyip/plugpac.vim
(what about compatibility of
E.g: ~/foo/bar
will result in:
'~/foo/bar'
"~/foo/bar"
\~/foo/bar
which is wrongNote: the 2 other are wrong too, because a ~
will only be expanded when not quoted.
https://linux.die.net/man/1/lesskey
And use --lesskey some_file
or LESSKEY
env var to configure less
.
Then we can stop using most
and use less
everywhere!
(and maybe learn to actually configure less
, with a long prompt or other...)
When in normal mode, it's ok to have a long timeoutlen
(~1s), but when in insert mode, sometimes I want to do escape then b, and sometimes I want to do Alt-b. And since Alt is encoded as escape, there is no way the terminal can disambiguate the 2 without relying on timeout.
The idea would be to have a long timeoutlen in normal mode and a short one in insert mode.
NOTE: I already tried that in zsh, but had a few issues (I should try again now?)
From HLWM's author!
HLWM config:
https://github.com/t-wissmann/dotfiles/blob/master/config/herbstluftwm/autostart
Nice utf8 char/string selector using rofi:
https://github.com/t-wissmann/dotfiles/blob/c4b49e845/menu/utf8db
https://github.com/t-wissmann/dotfiles/blob/c4b49e845/menu/utf8select.sh
Omnivim: vim in any app (triggered by a key (not a rule!) in its hlwm config:
https://github.com/t-wissmann/dotfiles/blob/c4b49e845f/config/herbstluftwm/omnivim.py
Better highlight in markdown, like the right one in:
microsoft/vscode#3429 (comment)
=> different background color for code block, headings
=> #19
https://github.com/SkyLeach/pudb.vim looks promising
This one looks interesting (in pure zsh):
https://github.com/Tarrasch/zsh-autoenv
Other one (in go, so works only for env vars):
https://github.com/direnv/direnv
IDEA: In main config, define mappings to virtual keys (ex: <Plug>some-virtual-key
) then in each filetype, map the virtual keys to something useful!
e.g:
main: nmap ²² <Plug>filetype-quickfix
markdown: nmap <Plug>filetype-quickfix 1z=
(to quick fix a spelling typo)
Reference 256 colors for terminal:
List: https://jonasjacek.github.io/colors/
JSON: https://jonasjacek.github.io/colors/data.json
Maybe change back my 16 colors to restore magenta instead of orange to fix the 256 color table (?)
TSIA
using raw
is only for pasting from tmux to a program, by sending the chars one by one to the app as I I've written them (could be useful to put some text in a repl).
I can use tmux' buffer to copy something in the current session and paste it somewhere else.
FIXME: can I have multiple named buffers in tmux?
Yes! http://man7.org/linux/man-pages/man1/tmux.1.html#BUFFERS
So I'd use a custom buffer for these copy paste operations between programs in tmux (and maybe ask which buffer to use?)
Also with #22, make sure I have a keybinding to copy selection to buffer, that I can paste in zsh/nvim/raw.
so that I can later/oneday(/never) use a separate program (sxhkd?) to manage workpaces, windows, and different WM actions on windows (and other stuff)
This way I can also move out of AwesomeWM and try other window manager!
See second comment for constructive info: #50 (comment)
The plugin https://github.com/kristijanhusak/vim-dadbod-ui is necessary (edit: it's not), but is a PAIN IN THE ASS TO USE!!!!
Because it forces you to use special buffers, that are managed by the plugin, not me!!!
The layout is rigid, and I cannot manage the windows myself without becoming crazy after a few window operations and query run..
Query buffers are meant to be run entirely by default, I never want to run the whole buffer (or I'll make a mapping for that if needed like :%RunTheQuery
)
My mapping of choice to run the current query:
nmap <leader><leader> mmvip<Plug>(DBUI_ExecuteQuery)`m
basically:
The result buffer is very special ><, it seems you can have ONLY one, even if I have multiple query buffer opened.
It opens with <C-w>J
Running :CtrlSpace hides the result window ARGH!!! WHYY
There is no way to make a mapping to create a new query buffer. :/
The tree view of the tables, schemas does not show the column names, that would be highly useful though!
The only way to see them is to select the 'columns' entry in the tree view, that opens a pre populated query that I can run
Queries & DB connections are saved globally in my ~/
It should be per project (so saved locally! and reloaded from that dir/file when starting DBUI)
It's kinda hard / weird / unintuitive to open a sql file I saved somewhere (with :w my_file.sql
), and link it to the DB I'm connected to with DBUI 'currently'. I can use :DBUIFindBuffer
, but why?? why would I want to find the buffer in the list of special buffers for DBUI...
Need a keybind to select some text I just pasted.
Might need a function to handle the different cases where the pasted text was character/line/block-wise.
gv
is to reselect last visual selection
Maybe I can try to find something similar? (note: gV gp gP are already taken)
gy
is available, but is incorrect: y is for copy not paste..
When opening multiple files from command line, only a few files gets highlighted, the first + some others (at random?).
Maybe linked to:
https://github.com/Coffee2CodeNL/gebaar-libinput
What makes this different over the other implementations?
libinput-gestures and fusuma both parse the output of the shell command libinput debug-events which is an unstable API and the output just keeps coming, so it'll eat (some) RAM.Gebaar directly interfaces with libinput to receive and react to the events.
This is more stable, faster, and more efficient as it does not parse the output of a program like the aforementioned projects do.
For last yanked text: https://github.com/machakann/vim-highlightedyank
For cursor{line,column}: todo!
Inspired by: junegunn/gv.vim#55
Idea:
j | k : normal j & k on current window
A-j | A-k : scroll alternate window 1 by 1
A-J | A-K : scroll alternate window à-la PageUp/Down
The alternate window is the other window (last / preview window):
(e.g: https://github.com/meowstars/zsh-conf a simple one)
For example:
In insert mode
Realize you didn't paste the correct thing
==> The pasted content AND the content inserted before the paste are undone.
👉 I want only the pasted text to be undone, and require a second undo for my text.
This seems to be possible by writing a custom paste handler by redefining vim.paste()
(in Lua).
See the help for ui-paste
(and vim.paste()
for impl details)
I'd have to first insert an undo/redo breakpoint (no idea how to do that) before the normal paste.
Nice theme for vim: https://github.com/rakr/vim-one
(and more globally: https://github.com/sonph/onehalf)
Something similar to https://github.com/hlissner/doom-emacs/blob/develop/modules/ui/popup/README.org (from an emacs conf)
I've been thinking about this for some time but never wrote about it. Finding this config made me think about writing this issue. (I won't develop today..)
See my discussion at: https://gitter.im/neovim/neovim?at=5e59c5feff6f6d2e8876b3f9
Now that I re-think about it, I don't really need vim-ripgrep plugin anymore, since I have Denite with 'grep/rg' filter (since 3e9ec7c) for project-wide searching.
However it can still be useful to search for a string and use quickfix-reflector plugin to edit quickfix list and modify a lot of files at once...
👉 But in this case I might as well make a special command for this worflow, that will temporarily disable Neomake during the operation. (and temporarily enable quickfix list modification with quickfix-reflector plugin)
@2022-11: Brain2 card, up-to-date with things to try for next-gen neovim config: 20221113T0007.
There is LSP support builtin in the recent neovim releases, but still requires some configs or custom configs (and lua?) which I don't want to go into just now.
In the meantime, there is LanguageClient-neovim (written in rust) which works well!
For LSP symbol viewing/navigation: https://github.com/liuchengxu/vista.vim
(also has a nice list of supported LSP clients to fetch symbols from, including LanguageClient-neovim)
So it's easy to know if all search results are currently visible, or if we're on the last ones, etc..
(is there a way to react to hlsearch activation & nohlsearch ?)
Highlight interesing words in a buffer: https://github.com/lfv89/vim-interestingwords
Originally posted by @bew in #24 (comment)
Will need a hook when returning to normal mode that stores the last insert position to a list of N positions stored in a (buffer? window?) local variable.
Can be disabled in recent versions of tmux:
tmux/tmux#140 (near the bottom of the issue)
Sometimes it closes the completion popup, so I have to press <enter>
twice to make a newline 😕 (unpredictable!)
https://github.com/ItayGarin/ktrl
Written in rust, inspired by QMK but as a linux daemon
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.