Hi all,
I'm using current geany SVN head and coding quite a bit of Haskell. One pretty significant annoyance is that one common way of formating Haskell code results in something that looks like this:
functionName :: Type1 -> IO Type2 functionName param = do putStrLn "In functionName" .....
The problem is that when I type the above in, I add the " = do" and then hit Tab for indentation and thats when geany decides to delete the "do" I've just typed.
Would be nice if this could be fixed.
Cheers, Erik
On Thu, Nov 24, 2011 at 11:39 AM, Erik de Castro Lopo mle+tools@mega-nerd.com wrote:
Hi all,
I'm using current geany SVN head and coding quite a bit of Haskell. One pretty significant annoyance is that one common way of formating Haskell code results in something that looks like this:
functionName :: Type1 -> IO Type2 functionName param = do putStrLn "In functionName" .....
The problem is that when I type the above in, I add the " = do" and then hit Tab for indentation and thats when geany decides to delete
Hi Erik,
tab only indents when it is at the start of the line (modulo whitespace), when you are using it it is activating "complete snippet" and since you don't have one starting "do" ...
You can indent at any point in the line using <ctrl>i (yes I know in the ascii days that was a tab but not in a gui)
Cheers Lex
the "do" I've just typed.
Would be nice if this could be fixed.
Cheers, Erik
--
Erik de Castro Lopo http://www.mega-nerd.com/ _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Lex Trotman wrote:
tab only indents when it is at the start of the line (modulo whitespace), when you are using it it is activating "complete snippet" and since you don't have one starting "do" ...
So how to I set up a haskell only "complete snippet" that leaves my "do" alone and inserts a Tab after the do when I hit the Tab key?
You can indent at any point in the line using <ctrl>i (yes I know in the ascii days that was a tab but not in a gui)
Thats doesn't work. If I have a line starting " = do", with cursor after the do and hit Tab, it puts a Tab before the "=" and not after the "do" which is where it should go.
Erik
On Thu, Nov 24, 2011 at 12:05 PM, Erik de Castro Lopo mle+tools@mega-nerd.com wrote:
Lex Trotman wrote:
tab only indents when it is at the start of the line (modulo whitespace), when you are using it it is activating "complete snippet" and since you don't have one starting "do" ...
So how to I set up a haskell only "complete snippet" that leaves my "do" alone and inserts a Tab after the do when I hit the Tab key?
Ahh, I got it backasswards, it deletes to do because by default you have a Haskell specific "do" snippet that pastes nothing to override a default do snippet, so you have to set it to paste "do<tab>", see http://www.geany.org/manual/current/index.html#user-definable-snippets
Maybe that would be a good change to the default snippets file, I guess you Haskell programmers will have to decide that.
Or the default snippets should not be language specific :(
You can indent at any point in the line using <ctrl>i (yes I know in the ascii days that was a tab but not in a gui)
Thats doesn't work. If I have a line starting " = do", with cursor after the do and hit Tab, it puts a Tab before the "=" and not after the "do" which is where it should go.
Terminology mismatch, indentation in Geany terminology is something that goes at the beginning of a line, not in the middle of a line, <ctrl>i adds whitespace at the beginning of the line.
Cheers Lex
Erik
Erik de Castro Lopo http://www.mega-nerd.com/ _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Le 24/11/2011 01:54, Lex Trotman a écrit :
On Thu, Nov 24, 2011 at 11:39 AM, Erik de Castro Lopo mle+tools@mega-nerd.com wrote:
Hi all,
I'm using current geany SVN head and coding quite a bit of Haskell. One pretty significant annoyance is that one common way of formating Haskell code results in something that looks like this:
functionName :: Type1 -> IO Type2 functionName param = do putStrLn "In functionName" .....
The problem is that when I type the above in, I add the " = do" and then hit Tab for indentation and thats when geany decides to delete
[...]
You can indent at any point in the line using <ctrl>i (yes I know in the ascii days that was a tab but not in a gui)
Or simply change the "complete snippet" keybinding to something other than <Tab> as a quickfix.
Cheers, Colomban