Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,260
    • Issues 4,260
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 401
    • Merge Requests 401
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #9365

Closed
Open
Opened Jul 25, 2014 by cheater@trac-cheater

Make command key in GHCi configurable

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!

Trac metadata
Trac field Value
Version 7.8.3
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC cheater, hvr
Operating system
Architecture
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#9365