GithubHelp home page GithubHelp logo

Comments (7)

nshen avatar nshen commented on May 14, 2024

既不报错也不生效还是挺奇怪的

  1. 确定文件是否已经加载到了,print(123),重启看看 :messages是否有123输出。
  2. 然后看被映射的命令是否可用 :vsp<CR> 看看是否能分屏。
  3. 最后看是不是快捷键被占用了,换成别的快捷键试试

from learn-neovim-lua.

wanxiankai avatar wanxiankai commented on May 14, 2024

既不报错也不生效还是挺奇怪的

  1. 确定文件是否已经加载到了,print(123),重启看看 :messages是否有123输出。
  2. 然后看被映射的命令是否可用 :vsp<CR> 看看是否能分屏。
  3. 最后看是不是快捷键被占用了,换成别的快捷键试试
  1. 在keybindings 文件内新增了 print(123), 重启之后使用 :message 没有123 输出,效果如下图:
    image

  2. 被映射的命令可用:
    image

  3. 这个我不清楚可以在哪里看到当前这个快捷键是否被占用,请问可以在哪里可以快速查看呢?

重复一下我的情况,我在设置了keybindings 这个文件,并且在init.lua 文件中导入了,但是这些快捷键都没有起效,目前看是所有的设置的快捷键都没效果,还不仅仅是某一个,所以我不清楚是哪里出了问题

from learn-neovim-lua.

nshen avatar nshen commented on May 14, 2024

你第一步就没有输出,说明 keybindings 就没有加载到,你可以在 init.lua 里print一下,重启后 :messages正常是这样的

image

看看你路径对不对吧

~/.config/nvim/init.lua

~/.config/nvim/lua/keybindings.lua

from learn-neovim-lua.

wanxiankai avatar wanxiankai commented on May 14, 2024

你第一步就没有输出,说明 keybindings 就没有加载到,你可以在 init.lua 里print一下,重启后 :messages正常是这样的

image

看看你路径对不对吧

~/.config/nvim/init.lua

~/.config/nvim/lua/keybindings.lua


image
-我的路径如上图所示,应该是没啥问题的

image
image

在init.lua 里面加入了print语句,重启之后使用 :messages 之后还是之前那个提示,实在是不知道问题出在哪了

from learn-neovim-lua.

nshen avatar nshen commented on May 14, 2024

init.lua 都没有加载到,我搜了一下,你那句是其他插件报的, ycm-core/YouCompleteMe#2748

你这个是vim还是nvim啊,是不是读了之前vim的配置

from learn-neovim-lua.

wanxiankai avatar wanxiankai commented on May 14, 2024

init.lua 都没有加载到,我搜了一下,你那句是其他插件报的, ycm-core/YouCompleteMe#2748

你这个是vim还是nvim啊,是不是读了之前vim的配置

确实是进了 vim 而不是 nvim, 使用 nvim 打开就没问题了,抱歉,我的错。

另外为什么使用 vim 这个命令,是因为之前按照课程所说的进行了 vim viv这几个键的映射,我在 .bashrc 中设置之后 执行 source ~/.bashrc 终端卡在了下面的情况下:

e12586d9193d3e3948e17f1adb28690

根据群里其他人的提示,我将设置映射的语句填写到了 ~/.profile 文件中:
image

然后 source ~/.profile 并没有报错,因此以为设置成功了,之后就一直使用vim进入了,这才导致了上面的问题

from learn-neovim-lua.

nshen avatar nshen commented on May 14, 2024

你那个bash有命令报错 shopt 找不到,所以没执行到设置别名呢。你先搜一下把那个报错解决就好了

from learn-neovim-lua.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.