首页 > 其他分享 >Strict Paredit

Strict Paredit

时间:2023-09-23 15:24:20浏览次数:28  
标签:right ctrl Sexp Strict Paredit Forward alt Backward

Strict Paredit

https://github.com/ailisp/strict-paredit-vscode

 

Strict Paredit

Classic, Emacs Paredit-like Structural editing and navigation for Common Lisp, Clojure and Scheme.

This is a Paredit extension for Visual Studio Code. It is a thin wrapper around paredit.js. You find it inside Code's extension view and on the Marketplace.

Commands

Note: You can choose to disable all default key bindings by configuring to . (Then you probably also want to register your own shortcuts for the commands you often use. see for example). By default the strict mode map is used. Below commands work in both strict mode and original mode. If you are new to Paredit, below shortcut in bond text is a small but very frequently used set of commands that helps in 95% of the time. I hightly recommend you memorize them to be efficient.paredit.defaultKeyMapnoneets/keys.json

Navigation

Default keybindingAction
ctrl+right Forward Sexp
ctrl+left Backward Sexp
ctrl+down Forward Down Sexp
ctrl+up Backward Up Sexp
ctrl+alt+right Close List

Selecting

Default keybindingAction
ctrl+w Expand Selection
ctrl+shift+w Shrink Selection
ctrl+alt+w Select Current Top Level Form

Editing

Default keybindingAction
ctrl+alt+. Slurp Forward
ctrl+alt+< Slurp Backward
ctrl+alt+, Barf Forward
ctrl+alt+> Barf Backward
ctrl+alt+s Splice
ctrl+alt+shift+s Split Sexp
ctrl+delete Kill Sexp Forward
ctrl+shift+backspace (on Mac) Kill Sexp Forward
ctrl+backspace Kill Sexp Backward
ctrl+alt+down Splice & Kill Forward
ctrl+alt+up Splice & Kill Backward
ctrl+alt+9, Ctrl+alt+( Wrap Around ()
ctrl+alt+[ Wrap Around []
ctrl+alt+{ Wrap Around {}
ctrl+alt+i Indent
ctrl+alt+t Transpose

You can also select the sexp with ctrl+w then wrap around by typing , or and delete it with ([{backsapce

Strict only keybinding

Strict mode keybindingAction
backspace Delete Backward or move left if at )]}
delete Delete Forward or move right if at )]}
shift+backspace (on Mac) Delete Forward or move right if at )]}
ctrl+alt+backspace Force Delete Backward
ctrl+alt+delete Force Delete Forward
alt+shift+backspace (on Mac) Force Delete Forward

NB: Strict mode is enabled by default. The backspace and delete keys won't let you remove parentheses or brackets so they become unbalanced. To force a delete anyway, use the supplied commands for that. Strict mode can be switched on/off by configuring to /.paredit.defaultKeyMapstrictoriginal

Copying/Yanking

Default keybindingAction
ctrl+alt+c ctrl+right Copy Forward Sexp
ctrl+alt+c ctrl+left Copy Backward Sexp
ctrl+alt+c ctrl+down Copy Forward Down Sexp
ctrl+alt+c ctrl+up Copy Backward Up Sexp
ctrl+alt+c ctrl+alt+right Copy Close List

Cutting

Default keybindingAction
ctrl+alt+x ctrl+right Cut Forward Sexp
ctrl+alt+x ctrl+left Cut Backward Sexp
ctrl+alt+x ctrl+down Cut Forward Down Sexp
ctrl+alt+x ctrl+up Cut Backward Up Sexp
ctrl+alt+x ctrl+alt+right Cut Close List

Maintainers

This project is forked from https://github.com/BetterThanTomorrow/calva-paredit. Original one is maintained by author Peter Strömberg as part of project calva, https://github.com/BetterThanTomorrow/calva

I maintain this fork with the following stress:

  • Tweak to keep the joy of original Emacs paredit, especially how delete, back parens and navigation works.
  • Make it useful for Common Lisp and Scheme developers (Assume there's no one use vscode to code Emacs Lisp :)

 

======= End

 

标签:right,ctrl,Sexp,Strict,Paredit,Forward,alt,Backward
From: https://www.cnblogs.com/lsgxeva/p/17724407.html

相关文章

  • strict=False 但还是size mismatch 的解决办法
    问题描述:#RuntimeError:Error(s)inloadingstate_dictforFusion_Generator:sizemismatchforfg_decoder.0.weight:copyingaparamwithshapetorch.Size([4096,1024]),g_decoder.0.weight:copyingaparamwithshapetorch.Size([4096,1024]...出现两个参数的不......
  • csv reader utf-8报错:strict 改为ignore
    classBufferedIncrementalDecoder(IncrementalDecoder):"""ThissubclassofIncrementalDecodercanbeusedasthebaseclassforanincrementaldecoderifthedecodermustbeabletohandleincompletebytesequences."......
  • 模型超参数基本都没改,测试时加载模型报模型结构不匹配,设置模糊加载模型即:model.load_s
    原因多卡训练;单卡模糊加载进行测试。训练时,通过torch.nn.DataParallel(self.model)进行多卡并行训练;测试时,用单卡模糊加载保存的模型权重,很多模型参数都没有加载成功,自然会导致测试效果很差。解决方法测试时,使用多卡加载模型时,删掉'module.'前缀;或者用单卡加载模型进行测试。......
  • 关于 HTTP 响应头字段 Strict-Transport-Security
    在Chrome开发者工具的Network面板里,当观察到一个请求的ResponseHeader字段名称为"Strict-Transport-Security",并且其值为"max-age=31536000;includeSubDomains;preload"时,这代表网站启用了严格传输安全(StrictTransportSecurity,HSTS)策略。HSTS是一种安全机制,旨在提高网站的安......
  • 使用redis-py的两个类Redis和StrictRedis时遇到的坑
    redis-py提供两个类Redis和StrictRedis用于实现Redis的命令,StrictRedis用于实现大部分官方的命令,并使用官方的语法和命令(比如,SET命令对应与StrictRedis.set方法)。Redis是StrictRedis的子类,用于向后兼容旧版本的redis-py。简单说,官方推荐使用StrictRedis方法。  不推荐Redis类,原......
  • 【linux】gcc编译选项:-fomit-frame-pointer,-fno-tree-vectorize,-fno-strict-aliasing
    Date:2018.9.81、参考https://www.cnblogs.com/islandscape/p/3444122.htmlhttps://blog.csdn.net/chdhust/article/details/8462414https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc.pdfhttps://blog.csdn.net/u012927281/article/details/50999138https://blog.csdn.net/sof......
  • 关于 SAP ABAP 事务码 SM30 里的 Restrict Data Range
    SAPABAP事务码SM30里的RestrictDataRange区域的Enterconditions和Variant这两个选项有什么作用?SAPABAP中的SM30事务码用于维护表的条目。在使用SM30事务时,RestrictDataRange区域允许用户定义一些限制条件,可以帮助缩小查询或更改的数据范围。这对于大型表......
  • Android studio 安装应用出现 The application could not be installed: INSTALL_FAIL
    错误详情Installationdidnotsucceed.Theapplicationcouldnotbeinstalled:INSTALL_FAILED_USER_RESTRICTEDListofapks:[0]'/Users/topjoy/git/git/ZeusSDK/Android/ZeusSDK/app/build/outputs/apk/debug/app-debug.apk'InstallationviaUSBisdisabl......
  • doris 报错: Insert has filtered data in strict mode, tracking url=
    最近使用doris插入数据时,报了如下错误: Inserthasfiltereddatainstrictmode,trackingurl=点击trackingurl的连接地址,可以查看报错具体详情我的程序报错时因为插入的数据长度超过字段长度,所以需要修改对应字段长度。通过命令进行修改即可ALTERTABLEmy_tableMODI......
  • 什么是“use strict”? 好处和坏处是什么?
    ES5添加严格模式,使得JS在严格 好处:消除Javascript语法的一些不合理、不严谨之处减少一些怪异行为;消除代码运行的一些不安全之处,保证代码运行的安全提高编译器效率,增加运行速度;为未来新版本的Javascript做好铺垫缺点:网站的JS都会进行压缩,一些文件用了严格模式,......