Avatar
xolag
fb64b9c3386a9ababaf8c4f80b47c071c4a38f7b8acdc4dafb009875a64f8c37
IT NetAdmin, Fotógrafo amateur.

#Vim Answer

Using dot “.” to repeat the last command, we deleted the next 5 words.

#Vim Quiz

A way to learn Vim.

Start from normal mode:

dw

5.

?

Si el tiempo estaba estupendo, ciudad de Camagüey, Cuba, tomada en Dic del 2021. ¡Gracias por el comentario!

Saludos

Changing the #Vim subject

Sharing a nice photo.

Want to see more:

https://youpic.com/photographer/xolag/

#Vim Tips

A way to improve your Vim skills!!!

Play a game!!!

https://vim-adventures.com

#Vim Tips:

interesting options to add to your .vimrc

I hope it will be useful for anyone

"Mis Reglas Básicas:

syntax on

filetype on

filetype plugin on

filetype plugin indent on

set number

set tabstop=4

set softtabstop=4

set shiftwidth=4

set expandtab

set autoindent

set smartindent

set foldmethod=indent

set foldlevel=99

set showcmd

set autochdir

set showmatch

set hidden

set hlsearch

set incsearch

nmap ,/ :nohlsearch

set ignorecase

set smartcase

set ruler

set wildmenu

set wildmode=list:full

set wildignore=*.swp,*.bak,*.pyc,*.class

set nobackup

set noswapfile

set noundofile

set spelllang=es,en

set spellsuggest=best

set helplang=es

set encoding=utf-8

set fileencoding=utf-8

"set fileformats="unix,dos,mac"

"set fileformat=unix

set backspace=indent,eol,start

" To save, press ctrl-s.

nmap :w

imap :wa

" Is has mouse

if has('mouse')

set mouse=a

endif

"Set general format

if has("gui_running")

set lines=37

set columns=126

"set guioptions-=m

set guioptions-=T

colorscheme desert

else

set background=dark

"colorscheme desert

endif

set lazyredraw

set laststatus=2

set cmdheight=2

set cursorline

" Avoid accidental hits of while aiming for

map!

" Quickly close the current window

nnoremap q :q

" Font. Very important.

if has('win32') || has('win64')

set guifont=Consolas:h12:cANSI

elseif has('unix')

set guifont="Monospace 10"

endif

" OTRAS OPCIONES

let mapleader=','

nnoremap ; :

set title

set visualbell

set noerrorbells

" Remap j and k to act as expected when used on long, wrapped, lines

nnoremap j gj

nnoremap k gk

" Easy window navigation

map h

map j

map k

map l

nnoremap w vl

" Yank/paste to the OS clipboard with ,y and ,p

nmap y "*y

nmap Y "*yy

nmap p "*p

nmap P "*P

" Quick alignment of text

nmap al :left

nmap ar :right

nmap ac :center

" Nerdtree File explorer plugin

map :NERDTreeToggle:NERDTreeMirror

map e :NERDTreeFind

nmap nt :NERDTreeFind

let NERDTreeShowBookmarks=1

let NERDTreeIgnore=['\.pyc', '\~$', '\.swo$', '\.swp$', '\.git', '\.hg', '\.svn', '\.bzr']

let NERDTreeChDirMode=0

let NERDTreeQuitOnOpen=1

let NERDTreeShowHidden=1

let NERDTreeKeepTreeInNewTab=1

#Vim Quiz

*A way to learn Vim.*

Start from normal mode:

`

yy

10j

dd

"0p

`

??

Replying to Avatar Erick

Nice!

Gracias Erick!!!

#Vim Answer

A way to learn Vim.

———————————————

10gg # go to line 10

f{ # forward to “{“in that line

ma # put a mark “a”

10 + enter # go to 10 line below

f} # forward to “}“in that line

mb # put a mark “b”

:`a,`bs/sin/cos/gci

# replace sin by cos between mark a to b

———————————————

#[0] thanks very much for zaps

npub1hswpe3sy2wdmgzzyd9nl8r32gc7nhkh60tmlx9er5dfk9u0f40qst048qg thanks very much for zaps

#VimQuiz #Vim

Una manera de aprender Vim.

—————————

:g/^A/d

:g/^$/d

—————————

?

Thanks you very much, that was fast!!!

Compartiendo imagen.

Más fotos mias en:

https://youpic.com/photographer/xolag/

#Vim Answer

Añado referencias a las ineas:

Buffers!!!

1. Abro 3 ficheros en vim. Cada uno va a un buffer

2. Habilito cambio rápido entre buffers

3. Listo los buffers abiertos

4. Me cambio a editar el buffer 2

5. Me cambio a editar el buffer siguiente o sea el 3

6. Cierro fichero que está en el buffer 1

7. Vuelvo a listar los buffers existentes

8. Guardo y cierro todos los ficheros abiertos en todos los buffers.

#Vim Answer

Añado referencias a las ineas:

1. Edito fichero textfile.txt

2. Voy a la linea10

3. Entro en modo visual de bloque

4. Selecciono el primer caracter de las siguientes 5 lineas

5. Voy al final de la primera linea

6. Entro en modo adición final de linea

7. Escribo “;” al final de la primera linea seleccionada.

8. Salgo modo edición.

9. Se añade “;” al final del resto de las 4 lineas que previamente se habían seleccionado en el punto 4.

#Vim Answer

Añado referencias a las ineas:

1. Edito fichero textfile.txt

2. Voy a la linea10

3. Entro en modo visual de bloque

4. Selecciono el primer caracter de las siguientes 5 lineas

5. Entro en modo edición a inicio

6. Escribo “#” al inicio de la primera linea seleccionada.

7. Salgo modo edición.

8. Se añade “#” al rest de las 4 lineas que previamente se habían seleccionado en el punto 4.

Una manera de comentar un texto.