新安装了SLIMV 0.8.4,paren匹配有效,没有缩进 [英] New SLIMV 0.8.4 install, paren matching works, indentation doesn't

查看:80
本文介绍了新安装了SLIMV 0.8.4,paren匹配有效,没有缩进的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要在上网本上出现硬盘故障后重新安装所有内容(重新安装Ubuntu Netbook Edition 10.04),并试图获得出色的

I'm reinstalling everything after a hdd failure on my netbook (fresh install of Ubuntu Netbook Edition 10.04), and am trying to get the excellent SLIMV working again.

在先前的安装上运行正常,但是对于此安装,括号匹配有效,但是自动缩进Lisp代码无效.命中return可使光标从下一行的第1列开始返回,无论它在嵌套paren中的什么位置.

It was working fine on the previous installation, but with this one, parenthesis matching works, but auto-indenting Lisp code does not. Hitting return starts the cursor back in column 1 of the next line, no matter where it is in the nested parens.

我一直在仔细阅读文档,以查看是否需要激活命令行或.vimrc开关以启用缩进,但什么也没看到.

I've been digging through the docs to see if there's a commandline or .vimrc switch that needs to be activated to enable indention, but don't see anything.

我只是想念它吗?任何建议表示赞赏.

Am I just missing it? Any suggestions appreciated.

推荐答案

  • 通过调用:echo SlimvIndent(lnum)来检查SlimvIndent函数是否已定义,其中lnum是要缩进的行号.它应该返回该行的缩进值.
  • 使用:verbose set lisp?命令检查是否关闭了lisp模式,该命令还会显示上次设置此选项的位置.应该为"nolisp",否则Vim将使用默认的lisp缩进.
  • 使用:verbose set indentexpr?命令检查是否设置了Slimv的缩进.它应该是"SlimvIndent(v:lnum)".
  • 某些缩进方法仅在Slimv连接到Swank服务器时才有效,因为它需要有关缩进形式的运行时信息(例如,带有& body参数的宏定义).
  • 确保使用最新的Slimv版本(当前为0.8.4),因为它具有与缩进相关的错误修复.
  • 请勿将Slimv存储库直接检出到vimfiles目录中,因为.hg目录中的文件可能会干扰Slimv安装.而是将文件检出到其他位置,然后仅将Slimv文件复制到vimfiles中.
    • Check that function SlimvIndent is defined by calling :echo SlimvIndent(lnum) where lnum is the line number to be indented. It should return the indentation value for the line.
    • Check that lisp mode is off with the :verbose set lisp? command, that also prints the location where this option was last set. It should be "nolisp", otherwise the default lisp indenting is used by Vim.
    • Check that Slimv's indentation is set with the :verbose set indentexpr? command. It should be "SlimvIndent(v:lnum)".
    • Some indentation methods work only if Slimv is connected to the Swank server, because it needs runtime information about the form to be indented (e.g. macro definition with &body argument).
    • Make sure you use the latest Slimv version (0.8.4 at the moment), because it has indentation related bugfixes.
    • Do not checkout the Slimv repository right into the vimfiles directory, because files in the .hg directory may interfere with the Slimv installation. Checkout the files to somewhere else instead and copy only the Slimv files into vimfiles.
    • 如果您仍然无法使用缩进功能,请给我发送邮件,我们可以讨论其他步骤.我是Slimv的作者,您可以在文档中或vim.org页面上找到我的电子邮件地址.

      If you still have problems with making the indentation work, then drop me a mail and we can discuss the additional steps. I'm the author of Slimv, you can find my email address in the documentation or on my vim.org page.

      这篇关于新安装了SLIMV 0.8.4,paren匹配有效,没有缩进的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆