New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question about shortcuts / bindings #27
Comments
Make sure that your cursor is on the correct line and that the line has a priority set already. Increasing/decreasing doesn't work with no priority on the line. |
@aurisnoctis I don't think it's a good idea to use |
@freitass Agreed. I had never used a self-defined mapleader before, just shortcuts like I open a todo.txt file, stay in normal mode, go to a line with priority troubleshooting:
Any help greatly appreciated. Edit: As another test, I defined Edit2: I now also defined |
@aurisnoctis that hyphen in the documentation is misleading, it is not included in the mapping. I will be fixing that soon. All of the mappings were changed to use instead of because that's the recommended policy for filetype plugins (to avoid collision with mappings defined by global plugins). To set your you do |
@freitass Thank you for getting back to me. I added Edit2 above, probably at the same time as your comment, and had defined I suspect my vim doesn't know about the todo.txt-vim files available in au BufRead,BufNewFile *.f set filetype=fortran au! Syntax fortran source ~/.vim/fortran.vim Could this be the reason? A missing hint to my vim to actually use it instead of just copying the files into |
@aurisnoctis Check if the mapping is correct by opening a todo.txt file and checking the output of
Also, make sure you have the latest version of this plugin, the function |
I now deleted everything in my :let mapleader="," :let maplocalleader = "," :nnoremap d dd the cursor still just goes one line up then pressing Re your comment above, yes, exactly, the todo.txt-vim mapping is not known to my vim, just my own definitions from :map ,k No mapping found :map \k No mapping found :map ,d n ,d * dd How can I make my vim see your configuration files? |
I again added the line au BufRead,BufNewFile todo.txt set filetype=todo au! Syntax todo source ~/.vim/ftplugin/todo.vim to tell my vim where to find the definitions (analog to what I had before for fortran highlighting for example). THIS WORKS. YAY. So is there a part of the documentation missing? Or is there a part of todo.txt-vim configuration that should have done that configuration above for me? |
The file |
@freitass My vim version self-confesses the following VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 4 2012 04:22:36) Included patches: 1-429 Modified by pkg-vim-maintainers@lists.alioth.debian.org Compiled by buildd@ Huge version with GTK2-GNOME GUI. Thanks for the hint - I didn't know there was a central infrastructure in vim to recognize file type. Here is the documentation for the file type detection in vim http://vimdoc.sourceforge.net/htmldoc/filetype.html. It says I am just glad it works. So it's just the same I did for Fortran highlighting, just with your specific |
First of all: thank you very much for this vim customization!
I like the idea of shortcuts a lot, but I am not sure how to use them. For instance I tried the option
<leader>-k : Increase the priority of the current line
. Myleader
is usually:
. For instance, when I want to save a file and then exit, I type:wq
. So I opened my todo.txt and typed:k
, also tried:-k
, but it returnsE471: Argument required
.I also tried marking the whole line before applying this, but no luck.
Any help is greatly appreciated - thanks.
Update:
My key was not defined, so I added
let mapleader=","
to my .vimrc. Then I tried,k
and,-k
in command mode, but still no success for me.Update 2:
I tried
date<tab>
now in insert mode, and it results in exactly that verbatim, without inserting the date. So maybe something is not set up correctly - like permissions. But I do get the highlighting, so the add-on is in the right folder~/.vim
.Update 3:
Some of my other mappings from long ago were conflicting these mappings. So I temporarily moved my
.vimrc
, and then typed -- using the default map leader\
--\k
in command mode. Still no luck.The text was updated successfully, but these errors were encountered: