Comments (9)
Done!
from comment-box.nvim.
Yes, it's because :CBllline
is for a titled line (first "l" for the alignement of the line, second "l" for the alignement of the text, then "line", so 3 "l"), it expects that there is a string to align left on the line where the space is.
For a simple full line, the command is :CBlline
(just 2 "l").
I agree that it's not very intuitive. I will add a check in case there is no text to avoid this behavior, thanks!
from comment-box.nvim.
I agree that it's not very intuitive. I will add a check in case there is no text to avoid this behavior, thanks!
Might be worthwhile to merge those two under one function.
if line_contains_text then
execute CommentWithSpace
else
execute CommentSimpleLine
from comment-box.nvim.
Yes. It's not only the space btw, it's also the symbols before and after the text that are put no matter a text is on the line or not (it didn't show in your example because the symbols before and after the text are set to the same symbol as the one for the line by default).
For example :CBllline10
without text gives:
# ├┤ ├──────────────────────────────────────────────────────────────────┤
I'm currently rewriting the plugin from the ground up for the next version, in part because of this kind of poor design choices. The "simple lines" and "titled lines" won't be treated as two different categories.
But it will take some time, I will make a patch for the current version.
from comment-box.nvim.
I'm currently rewriting the plugin from the ground up for the next version
Do you plan to land #36 there or as a patch for the current master?
from comment-box.nvim.
It will be for the the rewritten version, it needs too many changes to be patch for the current one. It's going quite well so far, but I honestly don't know when it will be available.
from comment-box.nvim.
Updated to latest, executing on this line:
config = function()
CBllline<cr>
Note the offset and spaces.
-- -- config = function() --------------------------------------------------------
:CBlline<cr>
-- -------------------------------------------------------------------------------
from comment-box.nvim.
Sorry, I don't understand what the problem is in your example?
from comment-box.nvim.
I would expect that from this:
config = function()
comment-box
returns either:
-- ---- config = function() ---------------------------------------------------
or
-- config = function() ---------------------------------------------------
Note the preserved column position.
from comment-box.nvim.
Related Issues (20)
- Extract text out of the box HOT 3
- Nice plugin, I like it HOT 1
- Are the Keybindings examples about accbox incorrect? HOT 2
- [Feature Request] A box/line picker HOT 1
- [BUG]: The comment_string of some filetypes will contain trailing space HOT 5
- [BUG]: CBcatalog error in windows HOT 1
- [Bug] Misalignment due to unstripped input HOT 2
- :CLxyline[num] commands don't pick style number while lua API calls work HOT 1
- doc: Incorrect commands HOT 1
- [Feature Request]: Make the length of the left aligned adapted box exceed box_width HOT 5
- Incorrect handling of inline comments HOT 3
- Incorrect box removal HOT 2
- Intendation isn't preserved HOT 2
- Line parameters have no effect HOT 4
- [BUG]: Titled lines and lines lengths are inconsistent in some file types HOT 4
- Not working for `.zshrc` HOT 5
- Plugin fails to build docs because of duplicate tags HOT 1
- [Feature Request]: Use vim.v.register to set the register when yanking HOT 1
- CBline length independent of Comment length
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 comment-box.nvim.