Comments (10)
I meant that functionality of "Type something which expands to
``` ```
or similar" is more suited for snippets (predefined and configurable set of expandable text). More info:
- https://github.com/L3MON4D3/LuaSnip
- https://github.com/rafamadriz/friendly-snippets (in particular this snippet, which you can modify to your taste)
Using snippets feels like an overkill. I will stick to nvim-autopairs for now
but I'd love to see this functionality getting implemented in mini.pairs.
from mini.nvim.
got it! tks for the reply and for all the plugins
from mini.nvim.
Thanks for suggestion, but no, this won't get implemented. mini.pairs
is intended to work only for single "open" and "close" characters. I feel that snippets are better for this kind of task.
from mini.nvim.
Thanks for suggestion, but no, this won't get implemented.
mini.pairs
is intended to work only for single "open" and "close" characters. I feel that snippets are better for this kind of task.
What snippets?
Is there an alternative to triple backticks?
from mini.nvim.
I meant that functionality of "Type something which expands to ``` ```
or similar" is more suited for snippets (predefined and configurable set of expandable text). More info:
- https://github.com/L3MON4D3/LuaSnip
- https://github.com/rafamadriz/friendly-snippets (in particular this snippet, which you can modify to your taste)
from mini.nvim.
Hi, in the case for triple backticks, if I input the third backtick, can mini.pairs ignore it and not insert the fourth backtick?
from mini.nvim.
Hi, in the case for triple backticks, if I input the third backtick, can mini.pairs ignore it and not insert the fourth backtick?
Unfortunately no. See this comment.
from mini.nvim.
hmm I got it that we can't work with pairs of triple backticks. But can we ignore the second pair of single backticks? Like mini.pairs already ignore ' after a letter.
Right now, after ``, if I hit ` again, I get 4 backticks and my cursor is between the third and fourth backtick.
from mini.nvim.
hmm I got it that we can't work with pairs of triple backticks. But can we ignore the second pair of single backticks? Like mini.pairs already ignore ' after a letter.
Right now, after ``, if I hit ` again, I get 4 backticks and my cursor is between the third and fourth backtick.
Ah, sorry, I misread my own comment.
But the answer is still a no, because 'mini.pairs' "knows" only about single character to its left and single character to its right when making a decision whether to insert a pair or not. So having a logic "if there are two backticks to the left then insert single backtick" is not designed to be done in 'mini.pairs'.
from mini.nvim.
Hey @georgeguimaraes , maybe this solution makes your life a little easier
['`'] = { action = 'closeopen', pair = '``', neigh_pattern = '[^\\`].', register = { cr = false } },
This would avoid the fourth backtick
from mini.nvim.
Related Issues (20)
- Expected string|function, got nil HOT 4
- count + next/last in nested surrounds HOT 1
- Unexpected behavior when deleting quotes from a string HOT 2
- `mini.diff` affects the `foldmethod` option of the window opened by `vim-flog`. HOT 1
- Error on second navigation using mini.files when mapped to `-` HOT 4
- `goto_left` and `goto_right` for next/last variants HOT 1
- mini.statusLine error `attempt to call field 'is_enabled' (a nil value)` HOT 3
- Slow replace with clipboard unnamedplus HOT 11
- [mini.git] Can I use :G instead of :Git HOT 2
- Feature: add option jump_to_single_result to lsp picker HOT 2
- Jump using ctrl-o not correct after navigating with lsp picker HOT 4
- When opening mini.files in a buffer deep into a project, I want mini.files to show that file. HOT 4
- mini.breadcrumbs plugin to show breadcrumbs of current cursor position using treesitter. HOT 1
- mini.files content.postfix HOT 1
- Add git conflict resolution HOT 1
- docs improvement (`mini.surround`) HOT 1
- [mini.sessions] Session management based on git branches HOT 3
- [mini.ai] Allow to return a different region depending on the operator. HOT 2
- mini.eolmark to show eol mark at cursor line? HOT 2
- unsure how to make the tests pass again after headless update HOT 6
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 mini.nvim.