set textwidth=0 " Don't wrap words by default
set ruler " Show the line and column numbers of the cursor
set nu " Show line numbers
set ts=4 "Tab space == 4 whitespaces
set sw=4
set et
colorscheme murphy
killasmurf86 said:I don't think words can express this....
but reading usr_01.txt to usr_04.txt is a thing i advise...
so many great features, so many ways to combine commands, so easy to do this and that..... i'm shocked
Tomorrow i'm removing [my so far default editor] geany, and never use le again (I used to like it)
hitest said:Okay. Now you really have me curious, killasmurf86! Thank you, I've got some reading to do. I'm looking forward to this!
[B]set nocompatible[/B]
[B]syntax on[/B]
set nomodeline
[B]set backspace=indent,eol,start[/B]
set ruler
[B]set history=50[/B]
set showcmd
set incsearch
set tabstop=4
set expandtab
set shiftwidth=4
set number
set scrolloff=5
set sidescrolloff=10
set incsearch
set wrapscan
set autoindent
set title
set hlg=en
set si
set backupdir=/home/killasmurf86/.bak
set backupext=.bak
set patchmode=.orig
set writebackup
set autoread
set enc=utf-8
set noautowrite
killasmurf86 said:Now after few hours of reading, I announce vim to be my favorite text editor.
gnemmi said:Code:set ts=4 == set tabstop=4 set sw=4 == set shiftwidth=4 set nu == set number set et == set expandtab
1 #include<stdio.h>
2
3 int main(){
4
5 /* a comment in here ... */
6
7 int a = 1;
8 char something{} = "Something to print";
9
10 printf("%s :%d\n", something, a);
11
12 return 0;
13 }
14
[gonzalo@inferna ~]% gcc -Wall -pedantic -O2 -o test main.c
main.c: In function 'main':
main.c:8: warning: ISO C forbids nested functions
main.c:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
main.c:8: error: expected expression before '=' token
main.c:10: error: 'something' undeclared (first use in this function)
main.c:10: error: (Each undeclared identifier is reported only once
main.c:10: error: for each function it appears in.)
[gonzalo@inferna ~]% vim +8 main.c
gnemmi said:I like "set nu" ...
[snip]
now .. just issue:
Code:[gonzalo@inferna ~]% vim +8 main.c
cajunman4life said:As an alternative to "set nu", I have the following:
nmap <C-N><C-N> :set invnumber<CR>
So if I want line numbers, I press ctrl+n twice. To get rid of them again, ctrl+n twice again.
gnemmi said:Code:[gonzalo@inferna ~]% vim +8 main.c
and vim will open main.c and position the cursor on line 8, all at once ...
"set nu" helps me get a visual check on whether the cursor jumped straight to line 8 or not
It might seem trivial in this example .. but on 670 lines of perl voodoo .. it really helps