Code Monkey home page Code Monkey logo

dotfiles's People

Contributors

bew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dotfiles's Issues

In editor: git commit diff split is not always accurate

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)

Bug in Ultisnips ? Using 'complex' nested snippets and jumping to placeholders

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:

  • do: n<tab>
    out: ${[]:} (in snippet n)
  • do: 1<next>
    out: ${1:[]} (in snippet n)
  • do: vis<tab>
    out: ${1:${VISUAL[default/transform/]}} (in snippet vis)
  • do: <backspace><next>
    out: ${1:${VISUAL}[]} (in snippet vis ? or snippet n ?)
  • do: <next> (I want to get out now!)
    out: ${1:[${VISUAL}]} (:warning: this is unexpected... Still in snippet n ?)
  • do: <next> (I guess I'm still in snippet n, I want to get out now!)
    out: ${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)
    This would mean I was not in a snippet when doing that last <next> ? How do I get out then ?

I wanted: ${1:${VISUAL}}[] ([] is the cursor in insert mode)

Move from vim-plug to `pack` based plugin managers?

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

vim-packager

https://github.com/kristijanhusak/vim-packager

minpac

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

Fix timeout issues for fast insert mode mappings - escape then x vs alt-x

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?)

Virtual mappings for unified but specialized mappings per filetype

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)

Allow copy/paste from/to tmux using zsh/nvim/raw

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.

Custom simple & flexible UI over vim-dadbod

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:

  • save cursor position
  • visual select paragraph (aka the current sql query)
  • execute query
  • restore cursor position (it moved due to the paragraph visual selection)

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...

Visual select pasted content

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..

gui: Use gebaar-libinput instead of libinput-gestures

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.

Mappings for GV & vim-plug (& others?) to scroll other window

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):

  • for vim-plug: useful when viewing the diff of an update, and checking a commit diff. The alternate window would be the preview window (as per https://github.com/junegunn/vim-plug/wiki/extra#extra-key-bindings-for-plugdiff)
  • for GV: when on the commit graph and viewing a commit diff, might be nice to scroll commit diff from commit graph (note: all diff are folded and closed, would need a way to control this from commit graph ? or too complicated / not really useful ?)

In insert mode, allow to undo bracket-pasted content only

For example:

In insert mode

  • write some text
  • middle-click to paste something from the primary buffer (on X)

Realize you didn't paste the correct thing

  • go back to normal mode
  • undo

==> 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.

BUG (from my config?) when using % in commandline

weird-zsh-with-percent
In the last example, when I use less, the text is correct in less, but some weird chars are still printed to the terminal...

weird-zsh-with-percent

I seems to repeat some old command I must have written some time ago (why??) and then do the command.
Maybe an issue with my custom prompt config, or sth?

Avoid quickfix list ownership issues between (e.g) neomake & vim-ripgrep

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)

LSP client and tools around LSP usage

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.