Comments (5)
I believe it is a work for plugin (If you are about hard wrap which persist in the file). @taconi does prettier taconi/plugin-channel#37 solves this?
If you need softwrap you can use softwrap
and wordwrap
options
from micro.
The prettier plugin uses the prettier tool and I know that it formats markdown files, maybe this plugin with some config help to solve this.
The other plugin with the same name also uses prettier if the other one helps.
You can also use the manager plugin to create your own formatters:
-- ~/.config/micro/init.lua
MANAGER_FORMATTERS_ENABLED = true
formatters = {
-- yarn global add markdownlint-cli
{ cmd = 'markdownlint --dot --fix %f', onSave = true, filetypes = { 'markdown' } },
}
from micro.
Seems kinda annoying that the solution is to install a plugin that depends on a tool written in node.js. I tried to write a plug-in that would do that, but could not figure how to access util.StringWidth
from Lua code (which would be necessary to figure out how long a string is, because Lua's string functions don't care about UTF-8).
from micro.
I tried to write a plug-in that would do that, but could not figure how to access
util.StringWidth
from Lua code (which would be necessary to figure out how long a string is, because Lua's string functions don't care about UTF-8).
We can add exporting util.StringWidth
to Lua, if needed. It should be trivial to implement.
Or perhaps you can get by with using the buffer cursor's GetVisualX()
method, which uses util.StringWidth
underneath?
from micro.
That sounds like it would be a reasonable addition in general, as, for example, anyone who would want to write a plug-in that prints or outputs a table would also want to know the width of strings of text.
from micro.
Related Issues (20)
- Copy from micro to another program does not work when micro running over ssh from Git Bash HOT 5
- Big file is freeze the micro for a while HOT 2
- Feature request: inline options HOT 4
- > replace powerful or confusing? HOT 2
- Cut command is very slowly on Windows Terminal HOT 4
- Is the BufWindow the same as BufPane? HOT 1
- Nightly builds are not the current master branch 😭 HOT 2
- Not working command and comnand switch HOT 2
- Micro 2.0.13 (Windows only) crashes when selecting a directory with "open" HOT 1
- IsWhitespace from util package not working HOT 6
- Alt-Shift-Left or Alt-Shift-Right are not recognized desipte getting detected in raw HOT 2
- Disable micro auto formatting bindings.json when adding new bindings HOT 1
- Garbled contents when reloading file with DOS line endings HOT 4
- Inconsistent keybindings behavior for Alt Shift Combinations HOT 4
- file manager plugin .. go up not work HOT 2
- Feature Request: Editor Width/Margins HOT 2
- JumpToMatchingBrace inconsistent with adjacent unpaired braces e.g. )[ or }( or )( HOT 8
- disable error HOT 2
- Confusion over missing bindings
- Differing copy-paste mechanics between tmux and non-tmux
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 micro.