Skip to content

Commit 6899c55

Browse files
committed
no vim or emacs
1 parent 4cb0f5c commit 6899c55

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "Text-Editor"
3-
version = "1.0.1"
3+
version = "1.0.2"
44
description = "Like webbrowser, but for the text editor"
55
authors = [
66
"Juan-Pablo Scaletti <juanpablo@jpscaletti.com>"

texteditor.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"""
44
import io
55
import os
6-
import pkg_resources
76
import re
87
import sys
98
import subprocess
@@ -16,25 +15,31 @@
1615

1716
EDITOR = 'EDITOR'
1817

18+
"""Why not include vim or emacs? Because:
19+
20+
1. If you are using it, you know what the EDITOR variable is, and you
21+
probably has set it already.it
22+
23+
2. If you aren't using it, finding yourself in their UI for the first time
24+
is going to be super confusing, in fact "How to exit vim" is a common
25+
Stack Overflow question. Having to google how to set an EDITOR variable is a
26+
less scary alternative.
27+
28+
"""
1929
COMMON_EDITORS = [
2030
'subl',
2131
'vscode',
2232
'atom',
2333
]
2434

25-
THE_GREY_ONES = [
26-
'vim',
27-
'emacs',
28-
]
29-
3035
MACOS_EDITORS = [
3136
# Only in MacOS, the "shell commands" are not installed by default
3237
'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',
3338
'/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code',
3439
'/Applications/Atom.app/Contents/Resources/app/atom.sh',
3540
'/Applications/TextMate.app/Contents/Resources/mate',
3641
'/Applications/Brackets.app/Contents/Resources/brackets.sh',
37-
] + COMMON_EDITORS + THE_GREY_ONES + [
42+
] + COMMON_EDITORS + [
3843
'/Applications/TextEdit.app/Contents/MacOS/TextEdit',
3944
]
4045

@@ -46,9 +51,9 @@
4651
'geany',
4752
'gedit',
4853
'nano',
49-
] + THE_GREY_ONES
54+
]
5055

51-
WINDOWS_EDITORS = COMMON_EDITORS + THE_GREY_ONES + [
56+
WINDOWS_EDITORS = COMMON_EDITORS + [
5257
'notepad++.exe',
5358
'notepad.exe',
5459
]
@@ -67,7 +72,8 @@ def get_possible_editors():
6772
if sys_platform.startswith(platform):
6873
return EDITORS[platform]
6974

70-
return COMMON_EDITORS + THE_GREY_ONES
75+
return COMMON_EDITORS
76+
7177

7278
def split_editor_cmd(cmd):
7379
r"""Split by spaces unless escaped.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy