Comments (4)
Certainly! It shouldn't be hard to implement at all, I'll have it done by the end of the weekend!
In the meantime, you can run ":%!v fmt -" to format your code at any point while you're programming.
Cheers!
from v-vim.
Implemented by #16 . You can now enable automatic file formatting via g:v_autofmt_bufwritepre = 1 or b:v_autofmt_bufwritepre = 1.
from v-vim.
Perfect, works well, thanks for jumping on it so quickly :)
from v-vim.
Update: pr #16 was an unsafe implementation of _VFormatFile, as it did not check whether vfmt had returned an error before altering the buffer. This could result in the contents of the buffer being replaced with an error message, which will be particularly troublesome if you write to file using :x, :wq, or ZZ. I apologize for my carelessness.
Pr #17 implements _VFormatFile safely by checking whether vfmt returned an error before altering the buffer. I urge you and anyone else who has installed the plugin in the past day to reinstall it immediately.
Once again, I apologize for the inconvenience.
from v-vim.
Related Issues (10)
- Support v scripts
- Mention vim plugin managers in readme HOT 1
- v_autofmt_bufwritepre appends trailing newline HOT 1
- Errors on formatting buffer via vfmt disappears after some time
- auto indentation doesn't work HOT 2
- Doesn't handle strings well (single and double quote) HOT 2
- Shall I take care of the maintenance? HOT 5
- Add highlight for #flag HOT 1
- Add highlight for generic functions HOT 1
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 v-vim.