[GHC] #9365: Make command key in GHCi configurable

GHC ghc-devs at haskell.org
Fri Jul 25 11:25:07 UTC 2014


#9365: Make command key in GHCi configurable
-------------------------------------+-------------------------------------
       Reporter:  cheater            |                   Owner:
           Type:  feature request    |                  Status:  new
       Priority:  normal             |               Milestone:
      Component:  GHCi               |                 Version:  7.8.3
       Keywords:                     |        Operating System:
   Architecture:  Unknown/Multiple   |  Unknown/Multiple
     Difficulty:  Easy (less than 1  |         Type of failure:
  hour)                              |  None/Unknown
     Blocked By:                     |               Test Case:
Related Tickets:                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 Hi,
 GHCi rightly uses the Vim-style mode of entering commands, where prefixing
 the prompt with a special character makes it into an entry on a meta-level
 (i.e. a command to the interpreter shell, not to the interpreter itself).
 Unfortunately, that character is fixed to be ':'.

 Many Vim power users hate having to press Shift several times a second and
 so make ';' that character in Vim. It's a popular tip on the Vim Tips
 site:

 http://vim.wikia.com/wiki/Map_semicolon_to_colon

 and tells you to perform the following settings:

 nnoremap ; :
 nnoremap : ;
 vnoremap ; :
 vnoremap : ;


 Having used Vim like this for much over ten years now, it's not even a
 habit or reflex any more to type the semicolon, therefore (for me at
 least) it's cumbersome and error prone to type the colon in GHCi.

 I ask that a new GHCi setting be added, with the following UI:

 :set command-chars "string"

 where each character of "string" will start command mode. Multiple (at
 least two) characters should be available for people switching from their
 old setting to their new setting.

 When command mode is started, even if you had done :set command-chars ";"
 and then have typed ';', the prompt should still start with ':', just like
 in Vim. This is to signify that you're in the command "mode".

 Thank you!

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9365>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list