Comments (10)
Thank you for the report. I could reproduce it.
- Open Vim with Crystal code
- Move to end with
G
. :vsplit
:CrystalFormat
This is because vim-crystal replaces whole current buffer as below:
- Get whole current buffer
- Format by
crystal tool format
- Remove entire current buffer
- Paste formatted code
I must preserve the cursor positions of all buffers.
from vim-crystal.
This issue is fixed at least in my environment.
Could you also check it?
from vim-crystal.
Thanks for looking at this. I can't check for a day or so, but will as soon as I can.
from vim-crystal.
It's OK when you have a time to check.
from vim-crystal.
Sorry for taking so long, it's a little better thank you, but still the other pane moves on longer files
:e spec/pg/connection_spec.cr
:sp
move so top split starts at line 14, ends at 43, and cursor is on 40
move so bottom split start at line 75, ends at 104, and cursor on 105
:w on bottom split
bottom split stays put, but top split moves so is top at line 1 and bottom at line 30. When I move to the top split, the split moves so the cursor is still on line 40, by making the top line 11 and the bottom 40.
from vim-crystal.
Ah, OK, I'll check it later. Thank you for the detail.
from vim-crystal.
Sorry for making you wait. I tried. It seems that cursor position is preserved but the screen position is not...
I'll try to fix it.
from vim-crystal.
At aebaadb, I confirmed that screen position is also fixed. Could you check it?
from vim-crystal.
Great! thank you!
from vim-crystal.
from vim-crystal.
Related Issues (20)
- Shorthand null checking indents an extra unit HOT 6
- Latest commit throws error on ECR files HOT 3
- ECR files break formatting entirely until vim restart HOT 2
- Add highlighting for variables HOT 4
- Option to write buffer before executing spec HOT 4
- have you looked into tree-sitter yet? HOT 2
- vim-crystal commands do not work HOT 8
- Create releases
- select not indended, should be handled like case HOT 1
- abstract def method prevents matchit to function properly
- Don't always require all specs
- Setting the compiler command to `bin/crystal` breaks the code on `:CrystalFormat` HOT 8
- Faulty syntax highlighting for numbers HOT 9
- [feature request] Comment block editing mode HOT 4
- Auto format should not block saving buffer HOT 3
- Syntax: regression in highlighting 'end' HOT 1
- macro 'end' highlighting regression HOT 1
- Regression in highlighting until...end HOT 1
- Invalid argument: crystalExceptional HOT 3
- Move to organization HOT 5
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 vim-crystal.