Skip to content

Commit

Permalink
Merge branch 'dev' v2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Meiser-Knosowski committed Dec 22, 2020
2 parents 8e51252 + ce19fbe commit 25e481a
Show file tree
Hide file tree
Showing 6 changed files with 518 additions and 476 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ A: Disable stuff in your `vimrc`, see [rapid-options][6] for details: >
Q: Which keys get mapped to what? Will that override my own mappings?
A: rapid-for-vim will not override existing mappings unless the corresponding
option is explicitly set. To use different key bindings use the
`<PLUG>`mapping. Otherwise rapid-for-vim create the followin mappings: >
`<Plug>`mapping. Otherwise rapid-for-vim create the followin mappings: >

<F2> Show all structure values
<F3> Show structure values at cursorline
Expand All @@ -127,7 +127,7 @@ A: rapid-for-vim will not override existing mappings unless the corresponding
Disable override existing mapping and Vim's default with
let g:rapidGoDefinitionKeyMap = 0

<leader>u List all significant appearances of word under cursor.
<leader>u List all significant references of word under cursor.
Override existing mapping with
let g:rapidListUsageKeyMap = 1

Expand Down Expand Up @@ -162,11 +162,19 @@ A: rapid-for-vim will not override existing mappings unless the corresponding
Override existing mapping with
let g:rapidAutoFormKeyMap = 1

Q: Does rapid-for-vim provide a mapping for indenting a complete file?
Q: When I switch syntax off I get false indentation sometimes?
A: Indentation partly depends on `syntax on` . If you have strings with ! or
keywords in it Indentation may get confused without syntax on. It should
do fine for the most part of your editing. See next question.

Q: Does rapid-for-vim provide a mapping for indenting the whole file?
A: No, but you may put the following in your .vimrc or
~/.vim/after/ftplugin/rapid.vim: >

nnoremap ANYKEY gg=G``zz
nnoremap <ANYKEY> mzgg=G`z
or if you don't use syntax highlighting >

nnoremap <ANYKEY> :syntax on<bar>normal mzgg=G`z<cr>:syntax off<cr>

Q: Scrolling feels sluggish. What can I do?
A: Switch error highlighting off: >
Expand Down
45 changes: 24 additions & 21 deletions doc/rapid.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*rapid.txt* Abb Rapid Command for Vim version 7.4 Last change: 20. Feb 2020
*rapid.txt* Abb Rapid Command for Vim version 7.4 Last change: 30. Nov 2020


VIM REFERENCE MANUAL by Patrick Meiser-Knosowski
Expand Down Expand Up @@ -121,7 +121,7 @@ A: rapid-for-vim will not override existing mappings unless the corresponding
Disable override existing mapping and Vim's default with
let g:rapidGoDefinitionKeyMap = 0
<leader>u List all significant appearances of word under cursor.
<leader>u List all significant references of word under cursor.
Override existing mapping with
let g:rapidListUsageKeyMap = 1
Expand Down Expand Up @@ -156,11 +156,18 @@ A: rapid-for-vim will not override existing mappings unless the corresponding
Override existing mapping with
let g:rapidAutoFormKeyMap = 1
Q: Does rapid-for-vim provide a mapping for indenting a complete file?
Q: When I switch syntax off I get false indentation sometimes?
A: Indentation partly depends on `syntax on` . If you have strings with ! or
keywords in it Indentation may get confused without syntax on. It should
do fine for the most part of your editing. See next question.

Q: Does rapid-for-vim provide a mapping for indenting the whole file?
A: No, but you may put the following in your .vimrc or
`~/.vim/after/ftplugin/rapid.vim`: >
nnoremap ANYKEY gg=G``zz
nnoremap <ANYKEY> mzgg=G`z
or if you don't use syntax highlighting >
nnoremap <ANYKEY> :syntax on<bar>normal mzgg=G`z<cr>:syntax off<cr>
Q: Scrolling feels sluggish. What can I do?
A: Switch error highlighting off: >
Expand Down Expand Up @@ -209,7 +216,7 @@ Exceptions may be |g:rapidCompleteCustom| and |g:rapidPathToBodyFiles|.
Also see these options for alternative <Plug> mappings.
|g:rapidConcealStructKeyMap| `<F2>` - `<F4>` change concealing of structure values
|g:rapidGoDefinitionKeyMap| `gd` to see declaration of word under cursor
|g:rapidListUsageKeyMap| `<leader>u` lists all appearances of current word
|g:rapidListUsageKeyMap| `<leader>u` lists all references of current word
|g:rapidListDefKeyMap| `<leader>f` lists PROC/TRAP/... of current file
|g:rapidMoveAroundKeyMap| `[[`, `]]` ... jumps around PROC/TRAP/...
|g:rapidFunctionTextObject| `if`, `af` and `aF` def/deffct text objects
Expand Down Expand Up @@ -244,9 +251,6 @@ Also see these options for alternative <Plug> mappings.
|g:rapidCompleteStd| Disable standard 'complete' setting
|g:rapidCompleteCustom| Enable custom 'complete' setting

*rapid-endwise-options*
|g:rapidEndwiseUpperCase| Use upper case for `vim-endwise`

*rapid-auto-correct-cfg*
|g:rapidAutoCorrCfgLineEnd| Auto correct mixed unix/dos line endings in *.cfg

Expand Down Expand Up @@ -309,6 +313,15 @@ colorscheme tortus or tortusless which makes use of these groups:
Index: |rapid-index|
==============================================================================
*rapid-indent*

Note: rapid-for-vim indentation works best with |syn-on|.
You may map >
nnoremap <ANYKEY> mzgg=G`z
or if you don't use syntax highlighting >
nnoremap <ANYKEY> :syntax on<bar>normal mzgg=G'z<cr>:syntax off<cr>
to indent the whole file with one key stroke.

Index: |rapid-index|
*g:rapidSpaceIndent*
g:rapidSpaceIndent:
-------------------
Expand Down Expand Up @@ -445,7 +458,7 @@ Index: |rapid-index|
g:rapidListUsageKeyMap:
-----------------------

`<leader>u`: List all appearances, outside of enum declarations and comments
`<leader>u`: List all references, outside of enum declarations and comments
of the word under the cursor in the |quickfix-window|.

To force this mapping if `<leader>u` is already mapped: >
Expand Down Expand Up @@ -502,7 +515,8 @@ Note: These mappings overshadow the default Vim commands
To force these mappings off and make Vims default available: >
let g:rapidMoveAroundKeyMap = 0
Note that |g:rapidFunctionTextObject| depend on these mappings.
Note that |g:rapidFunctionTextObject| and |g:rapidCommentTextObject| depend on
this feature.


Index: |rapid-index|
Expand Down Expand Up @@ -659,17 +673,6 @@ See also |rapid-complete|.
If omitted or set to 0 no custom files get added to complete.


Index: |rapid-index|
==============================================================================
*g:rapidEndwiseUpperCase*
g:rapidEndwiseUpperCase:
------------------------

Insert upper case `ENDIF` etc. instead of lower case when `vim-endwise`
triggers: >
let g:rapidEndwiseUpperCase = 1
Index: |rapid-index|
==============================================================================
*rapid-debug*
Expand Down
4 changes: 2 additions & 2 deletions ftdetect/rapid.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
" Language: ABB Rapid Command
" Maintainer: Patrick Meiser-Knosowski <knosowski@graeff.de>
" Version: 2.0.0
" Last Change: 11. Apr 2019
" Last Change: 17. Sep 2020
" Credits:
"
" Suggestions of improvement are very welcome. Please email me!
Expand All @@ -23,7 +23,7 @@ augroup rapidftdetect
au! filetypedetect BufRead *.cfg,*.Cfg,*.CFG if getline(1) =~ '^\w\+:CFG' | call <SID>RapidAutoCorrCfgLineEnding() | endif
augroup END
if !exists("*<SID>RapidAutoCorrCfgLineEnding()")
function <SID>RapidAutoCorrCfgLineEnding()
function <SID>RapidAutoCorrCfgLineEnding() abort
setf rapid
if get(g:,'rapidAutoCorrCfgLineEnd',1)
silent! %s/\r//
Expand Down
Loading

0 comments on commit 25e481a

Please sign in to comment.