files_texteditor icon indicating copy to clipboard operation
files_texteditor copied to clipboard

Enable vi keybindings

Open osresearch opened this issue 5 years ago • 1 comments

The ace editor supports a vi mode, but to enable it requires that I open a console and type:

aceEditor.setKeyboardHandler("ace/keyboard/vim")

every time I edit a document. Ideally this would be available as a user preference, similar to what was implemented in #119 .

Steps to reproduce

  1. Open a text document
  2. Open the console
  3. Paste aceEditor.setKeyboardHandler("ace/keyboard/vim")
  4. Enjoy vi mode while the document is open for editing

Nextcloud Version

  • 15.0.8

osresearch avatar Jul 10 '19 14:07 osresearch

Hi, vim key bindings would be great; however, in version 20.2 the aceEditor.setKeyboardHandler("ace/keyboard/vim") comannd in the console window throws the following error

Refused to load the script 'https://192.168.9.234:9823/apps/files/keybinding-vim.js' because it violates the following Content Security Policy directive: "script-src 'nonceLWlBmTk5MWGtOaHJIOEZMQT06SGtsVHo2cEZlNzAvTlhMeG1EYkNnaFVCVFMvYldKQUNZa=' blob:". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

I'm using the stable files_texteditor

yamsu avatar Dec 04 '20 01:12 yamsu