From e3b1eb62ccda453ee728965605d19e85c62741ea Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Sat, 16 Feb 2019 20:00:38 +0000 Subject: tools vim added vimdiff --- tools/vim.html | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'tools/vim.html') diff --git a/tools/vim.html b/tools/vim.html index b3354d8..441fc50 100644 --- a/tools/vim.html +++ b/tools/vim.html @@ -44,7 +44,7 @@

Default vimrc skeleton is configured to use wombat2mod, which is installed by adduser skeleton.

-

3. Split and Tab

+

3. Split and Tab

Horizontal split;

@@ -179,12 +179,27 @@
             comma (,), press esc to confirm.
         
 
-        

6. Spell check

+

6. Spellcheck

Press z= over the bad written word and select desired one.

7. Plugins

+

8. Vimdiff

+ +

If two files are open in split type :diffthis in both windows to get vimdiff of the files. To close type :diffoff.

+ +
+
do
+
Get changes from other window into the current window.
+
dp
+
Put the changes from current window into the other window.
+
]c +
Jump to the next change.
+
[c - Jump to the previous change. +
Ctrl W + Ctrl W - Switch to the other split window. +
+ Systools Index

This is part of the Hive System Documentation. Copyright (C) 2019 -- cgit 1.4.1-2-gfad0 From 37ab43ffab13571d13565e27a4c28cc59d02e9c4 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Sat, 16 Feb 2019 20:26:01 +0000 Subject: git and vim document fix's --- dev/git/index.html | 2 +- tools/vim.html | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'tools/vim.html') diff --git a/dev/git/index.html b/dev/git/index.html index 2731283..ed64efa 100644 --- a/dev/git/index.html +++ b/dev/git/index.html @@ -29,7 +29,7 @@ $ git config --global core.pager "less -F -X"

-

Use vimdiff as diff and merge tool;

+

Use vimdiff as diff and merge tool;

     $ git config --global diff.tool vimdiff
diff --git a/tools/vim.html b/tools/vim.html
index 441fc50..89ac0c0 100644
--- a/tools/vim.html
+++ b/tools/vim.html
@@ -6,7 +6,7 @@
     
     
 
-        Systools Index
+        Tools Index
         

Vim

<leader> with default configuration is key \, so when @@ -194,13 +194,15 @@

Get changes from other window into the current window.
dp
Put the changes from current window into the other window.
-
]c +
]c
Jump to the next change.
-
[c - Jump to the previous change. -
Ctrl W + Ctrl W - Switch to the other split window. +
[c
+
Jump to the previous change.
+
Ctrl W + Ctrl W
+
Switch to the other split window.
- Systools Index + Tools Index

This is part of the Hive System Documentation. Copyright (C) 2019 Hive Team. -- cgit 1.4.1-2-gfad0 From f87cd06b4072c23cfd3313227318ef5259003934 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Mon, 4 Mar 2019 16:44:37 +0000 Subject: vim documentation revision --- tools/index.html | 7 +++--- tools/vim.html | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 74 insertions(+), 9 deletions(-) (limited to 'tools/vim.html') diff --git a/tools/index.html b/tools/index.html index 816e651..0afdf3e 100644 --- a/tools/index.html +++ b/tools/index.html @@ -30,9 +30,10 @@

  • 3. Split and tab
  • 4. File browser
  • 5. Editing files
  • -
  • 6. Spellcheck
  • -
  • 7. Plugins
  • -
  • 8. Vimdiff
  • +
  • 6. Tags
  • +
  • 7. Spellcheck
  • +
  • 8. Plugins
  • +
  • 9. Vimdiff
  • Gpg diff --git a/tools/vim.html b/tools/vim.html index 89ac0c0..dd1e8a6 100644 --- a/tools/vim.html +++ b/tools/vim.html @@ -2,12 +2,12 @@ - Vim + Vim Tools Index -

    Vim

    +

    Vim

    <leader> with default configuration is key \, so when you see <leader>-W means pressing \W

    @@ -29,7 +29,7 @@ personalizing it;

    -        $ sudo cp ~/sysdoc/conf/etc/skel/.vimrc /etc/skel/
    +        $ sudo cp ~/doc/conf/etc/skel/.vimrc /etc/skel/
             $ sudo mkdir /etc/skel/.vim
             $ sudo mkdir /etc/skel/.vim/swap
             $ sudo mkdir /etc/skel/.vim/views
    @@ -85,6 +85,19 @@
                 
    Open vertical split with file browser.
    +

    To find files, run vim at top level of project and then use find auto completion or *;

    + +
    +        :find nameofdirectory + Tab
    +        :find nameofdir* + Tab
    +        
    + +

    For file browsing there is also a option to use edit;

    + +
    +        :edit nameofdirectory/
    +        
    +
             

    5. Editing files

    Come from background;

    @@ -179,13 +192,64 @@ comma (,), press esc to confirm. -

    6. Spellcheck

    +

    6. Tags

    + +

    Tags, at top level of project;

    + +
    +        $ ctags -R .
    +        $ vim src/hello_world.c
    +        
    + +

    To follow a tag;

    + +
    +        Ctrl-]
    +        
    + +

    To get back;

    + +
    +        Ctrl-t
    +        
    + +

    Autocomplete, press to see all options;

    + +
    +        Ctrl-n
    +        
    + +

    To move forward and backward in options;

    + +
    +        Ctrl-n Ctrl-p
    +        
    + +

    Show auto completion with references to only this file;

    + +
    +        Ctrl-x Ctrl-n
    +        
    + +

    Show auto completion with filenames, * Tab can be used;

    + +
    +        Ctrl-x Ctrl-f
    +        
    + +

    Show auto completion with only tags;

    + +
    +        Ctrl-x Ctrl-]
    +        
    + +

    7. Spellcheck

    Press z= over the bad written word and select desired one.

    -

    7. Plugins

    +

    8. Plugins

    -

    8. Vimdiff

    +

    9. Vimdiff

    If two files are open in split type :diffthis in both windows to get vimdiff of the files. To close type :diffoff.

    -- cgit 1.4.1-2-gfad0