Coder Social home page Coder Social logo

vim-capslock's Introduction

capslock.vim

Press <C-G>c in insert mode to toggle a temporary software caps lock, or gC in normal mode to toggle a slightly more permanent one.

Installation

If you don't have a preferred installation method, I recommend installing pathogen.vim, and then simply copy and paste:

cd ~/.vim/bundle
git clone https://github.com/tpope/vim-capslock.git
vim -u NONE -c "helptags vim-capslock/doc" -c q

Once help tags have been generated, you can view the manual with :help capslock.

Contributing

See the contribution guidelines for pathogen.vim.

Self-Promotion

Like capslock.vim? Follow the repository on GitHub and vote for it on vim.org. And if you're feeling especially charitable, follow tpope on Twitter and GitHub.

License

Copyright (c) Tim Pope. Distributed under the same terms as Vim itself. See :help license.

vim-capslock's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vim-capslock's Issues

Make use of CmdlineLeave autocmd

With the CmdlineLeave available on Vim 8.1 the command-line can be made a first-class citizen on capslock plugin.

Despite I made an habit of disabling it when I leave the command-line, it'd be good to have it disabled automatically, just as in insert mode.

I'm wondering if there is an appropriated way to give an indication (similar to the one in status-line for insert mode). I thought about inserting a tag on the end or beginning of the line, and using a mapping on Enter to remove it, but that would break some functions, such as autocomplete (c_CTRL-D).

Does not capitalize non-us characters

The swedish letters å, ä and ö does not get capitalized when using the plugin

Thought I should at least send in an issue about it, might do a PR about it

Link at vim.org

First of all, thank you very much for sharing this great plugin!
I have been using it for some years, and it works very well.

I have I small suggestion: include this repository on the description of capslock.vim at vim.org -- I found this repo by luck :-)

gC toggle not working on vim version 9.0

Hi tpope,
Thanks for making this convenient tool!
Recently I tested it on my vim version 9.0 and found the gC toggle is not working: when toggled the vim-airline status line(at bottom) show it is now 'CAPS', but the actual function is not. Do you have any idea of this? Thanks.

Doesn't work in Vim 7.3

When I start Vim I get the following error:

Error detected while processing /Users/dima/.vim/bundle/vim-capslock/plugin/capslock.vim:
line 60:
E216: No such group or event: InsertCharPre * if s:enabled() | let v:char = v:char ==# tolower(v:char) ? toupper(v:char) : tolower(v:char) | endif
Press ENTER or type command to continue

My Vim version:

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 20 2012 13:16:02)
Compiled by [email protected]
Normal version without GUI. Features included (+) or not (-):
-arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
-conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
-dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path
+find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv
+insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape
-mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse
+mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype
+path_extra -perl +persistent_undo +postscript +printer -profile +python/dyn
-python3 +quickfix +reltime -rightleft +ruby/dyn +scrollbind +signs
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
-toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -D_FORTIFY_SOURCE=0 -Iproto -DHAVE_CONFIG_H -arch i386 -arch x86_64 -g -Os -pipe
Linking: gcc -arch i386 -arch x86_64 -o vim -lncurses

Not working on vim 7.4.541

When I first installed this plugin it worked as expected. After upgrade to Vim 7.4.541 it no longer works. I tried removing plugins that were installed after vim-capslock and it still does not work.

when I execute :imap I see

    i  <Plug>CapsLockDisable * <C-R>=<SNR>61_disable()<CR>
    i  <Plug>CapsLockEnable * <C-R>=<SNR>61_enable()<CR>
    i  <Plug>CapsLockToggle * <C-R>=<SNR>61_toggle()<CR>
    i  <C-G>c        <Plug>CapsLockToggle

What else can I do to debug my issue?

I'm running on Ubuntu 14.04.1 64 bit.

<C-L> mapping is triggered with <C-X><C-L>

When typing <C-X><C-L> in insert mode it is expected to trigger whole-line completions. But if this plugin is installed caps lock in insert mode is triggered.

Expected behaviour:
<C-X><C-L> - whole-line completion
<C-L> - caps lock

Command-line capslock

I've just updated to the latest version and noticed that the cmap doesn't works anymore:

cmap <C-L> <Plug>CapsLockToggle

Maybe I was abusing of an implementation detail, as the help file only mention insert mode. But I'm wondering if it is complicated to make it work on command line.

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.