Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.5k
    • Issues 5.5k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 631
    • Merge requests 631
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #19030

Check $VISUAL before $EDITOR

Motivation

Currently GHCi checks the $EDITOR environment variable to set the editor which is launched by :edit. There is another environment variable $VISUAL which is also used for selecting the default editor on Unix. I use both, but as is suggested in this post on StackExchange, I set $EDITOR to ex and $VISUAL to vi. Thus GHCi always launches ex instead of the desired vi.

Proposal

I suggest simply checking the $VISUAL variable first, and only if it is unset then using $EDITOR. Other command-line tools do this, for example Git.

The change would have to be made here I think. I don't know enough about monads or IO to do this myself though.

GHCi ~"feature request" Plow

Edited Dec 06, 2020 by Olius
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking