Skip to content
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

Multi line string editing #727

Closed
hvr opened this issue Jun 17, 2015 · 2 comments
Closed

Multi line string editing #727

hvr opened this issue Jun 17, 2015 · 2 comments

Comments

@hvr
Copy link
Member

hvr commented Jun 17, 2015

I'm writing down this feature request in case somebody may be interested implementing this... :-)

Haskell2010 allows for multi-line strings via \ \-gaps (w/o requiring to invoke TH+QQ which IMO is overkill if it's just to be able to write here-docs-ish multi-line strings), e.g.

longStr = "Lorem ipsum dolor sit amet, \
          \consectetur adipiscing elit, \
          \sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \
          \Ut enim ad minim veniam, \
          \quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."

haskell-mode could provide a way to "zoom" (think of a lens =) ) into that string-literal via a temporary buffer, allowing to edit the string, and when finished, update the string-literal in the Haskell code.

One may optionally want to allow to convert \n to/from newlines in the string-buffer-view. As well as allow to convert string-literals with \ \-gaps to ones w/o such gaps (this is sadly needed when enabling CPP).

See haskell-string-literal-decode1 where I included support for string-gaps while decoding (with this ticket's feature in mind...)

@gracjan
Copy link
Contributor

gracjan commented Jun 17, 2015 via email

@gracjan gracjan changed the title multi-line string editing Multi line string editing Jun 18, 2015
@gracjan gracjan changed the title Multi line string editing [Discussion] Multi line string editing Sep 2, 2015
@gracjan gracjan changed the title [Discussion] Multi line string editing Multi line string editing Feb 22, 2016
@gracjan
Copy link
Contributor

gracjan commented Feb 22, 2016

I do not see temporary buffer as a good design in usability terms.

Indentation supports multiline strings and this has to be good enough for now.

@gracjan gracjan closed this as completed Feb 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants