highlighting for empty positions in visual block mode & field/templating
Is your feature request about something that is currently impossible or hard to do? Please describe the problem. I am a visual person, and shapes and outlines help me format documents. Visual block mode does not highlight empty positions. It would be helpful for me to see the boundaries of the text as an object better, especially when I try to be neat and keep things in multiple rows on the same line.
Describe the solution you'd like Implement some mechanism to highlight empty positions in visual block mode, maybe through a new highlight type for empty positions.
Describe alternatives you've considered I have just thought of this and have not looked deeply into solutions.
Additional context You could maybe block out a document with fields or something even, using a new empty position type. Maybe that would be completely unrelated. Kind of like making the entire document a field.
Hey in fact what about implementing some type of templating through drawing or erasing empty/non-empty positions? you could just copy paste the templates containing fields using visual block mode too.
can you please share a screenshot of what exactly you mean? What exactly you mean with empty positions?
I think it may work with either some custom colorscheme or with some listchars values and :set list set.
I'm guessing they mean this: https://github.com/0xAdk/full_visual_line.nvim
I use that plugin and it works well but sometimes can lag on larger files due to how it needed to be implemented. A built-in option would be nice
yeah initially what i was thinking is what full visual line plugin does, but just a square boundary around the item, and which I could move with key presses in directions like a game sort of. sort of like 'the world's hardest game' flash game with the movement but it could move within empty ~~space~~ positions in the document (leftward empty positions would need to be converted to spaces when placed, rightward empty spaces contained in the visual block don't necessarily need to), but then I also started to think, what if the visual block I selected coud be remembered as a field in some way to where the edges of that visual selection would act as a end-of-line so that I could continue just writing on multiple lines contained in that visual block selection as if it were a field? if this were done, you could use visual block selection to basically also create a bounding box (maybe as an option) for text input confined to that area. Now that I think about it this probably has a plugin of some type, but then if you wanted to type in the text area left of the multi line visual block you allocated in line with your existing document, you still face the issue with breaking the in line allocated block of text to the right when you return. so some type of bounding box behavior would fix this, a bounding box that prevents new lines from being added, but still formats correct indentation as if the document just shrank to the size and position of the bounding box.
but then i started thinking what if there could be field creation mechanism for vim where you could quickly define a layout for a document consisting of fields of this nature sort of like laying out a newspaper, or if you've ever cut words out of a magazine to write a fake ransome note in school, or for some poetry or english creative writing project. the words sort of lign up as like a left to right game of tetris. if certain positions in a document could impede visual block movement as I conceive of it, and some logical restriction or virtual shrinking of the document to bounding boxes could be fenagled out of that, the bounding box could be a "drawable" field type position where one could easily block out a visual representation of where you want to place your code or info and vim would follow that.
maybe you couldn't do multiple fields and save them, but you could probably have an active, drawn, field defining the boundaries of a 'virtual' document (bounding box custom shape consisting of many overlapping bounding boxes that merge as a single field) that would respect a new, impeding, empty position type, in my conception of how it might be done.
theres various things that would have to be worked out how it would handle text that was inserted beyond the confines of the bounding box, but it would definitely extend the visual block mode a bit more even with 1 bounding box field like this. hope I didn't write all this and this actually already exists.
ps. I don't know if this would be of any big brain assistance on the problem of handling too long of text in the defined bounding box. maybe just wrap it back over the start of the top or left if the bounding box is attempted to be written outside of: https://www.youtube.com/watch?v=fhNc0q5N3p0
It sounds like my visual line mode suggestion differs from what @LaptopDev wants. I still think https://github.com/0xAdk/full_visual_line.nvim would be a great addition to core Vim so in the interest of keeping these two requests separate, I'll make another GitHub issue for that.
It sounds like my visual line mode suggestion differs from what @LaptopDev wants. I still think https://github.com/0xAdk/full_visual_line.nvim would be a great addition to core Vim so in the interest of keeping these two requests separate, I'll make another GitHub issue for that.
hi ColinKennedy Can I use this full_visual_line.nvim in my vim directly? I don't want to switch nvim now.
full_visual_line.nvim uses Neovim's extmarks feature. I don't think Vim has an equivalent that would work in this case but I could be wrong.
full_visual_line.nvim uses Neovim's extmarks feature. I don't think Vim has an equivalent that would work in this case but I could be wrong.
Ok, thanks for your replying.