推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
ling516
V2EX  ›  Python

pycharm 如何快速打出三双引号快捷键?

  •  
  •   ling516 · Jan 26, 2022 · 4503 views
    This topic created in 1588 days ago, the information mentioned may be changed or developed.

    """"""

    4 replies    2022-02-09 13:27:39 +08:00
    ila
        1
    ila  
       Jan 26, 2022 via Android
    live template 。
    或打出三个后回车,IDE 自动补全
    2i2Re2PLMaDnghL
        2
    2i2Re2PLMaDnghL  
       Jan 26, 2022   ❤️ 1
    俺寻思 PyCharm 自带,打三个引号自动补成六个
    连续按下引号时:

    |
    "|"
    ""|
    """|"""
    ipwx
        3
    ipwx  
       Jan 26, 2022
    PyCharm 自带,打三个 """ 变成六个,换行还自动产生 docstring 的格式。
    bcaso
        4
    bcaso  
       Feb 9, 2022
    使用 AHK 脚本。

    !'::
    {
    Send, """"""{Left 3}{Enter}{Enter}{Up}
    return
    }

    效果是在按下 alt+' 键后输出:

    先输出 6 个 " 再点击键盘上的左方向键 3 次,再点击两次 Enter 键,最后点击一次上方向键。

    """
    光标停在中间
    """

    如果怕误触发,可以加利用 Caplock 键的状态做一个判断:

    !`::
    {
    If GetKeyState("ScrollLock","T") ; 在大写键开启的状态下执行
    {
    Send, ````````````{Left 3}{Enter}{Enter}{Up}
    return
    }
    return
    }
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   993 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 5414617a · 35ms · UTC 22:15 · PVG 06:15 · LAX 15:15 · JFK 18:15
    ♥ Do have faith in what you're doing.