-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: Use getpos() and setpos() to preserve cursor position #12
Comments
Hmm, I am trying to test out your wrap function on some files, but I am not having any luck seeing the difference between it and plain |
It turns out neoformat does do that. I used that function for markdown files, when it turns out that they were using the wrong mapping because of my shada/viminfo file remembers too much, including old mappings. doh! |
I'm seeing Neoformat move my cursor to the top of the window on every |
Neoformat should be able to save the cursor position to the extent that is possible with vim.
Does the issue occur when using |
Yeah, if I setup:
then |
Interesting. Can you provide an example file? |
Sure! The file I'm editing: import styled from "styled-components";
const Heading = styled.h1`
color: #0f80aa;
font-family: sans-serif;
font-size: 50px;
`;
export default Heading; My Neoformat settings: let g:neoformat_enabled_javascript = ['prettier']
let g:neoformat_enabled_jsx = ['prettier']
autocmd! BufWritePre *.js Neoformat |
I have tested that file with the following setup: prettier --version: 0.18.0 And I am |
Okay, I can reproduce this bug now. Would you mind creating a fresh issue for this? |
I use this function, but I think neoformat should do something like this by default
The text was updated successfully, but these errors were encountered: