Page 2 of 2
Re: Position of the star in a pointer declaration. Poll
Posted: Thu Sep 09, 2010 4:58 am
by Kojack
betajaen wrote:nikki wrote:vim.

You misspelled
sublime there Nikki.

Nikki got the first 2 letters right, but the rest of the name should be "sual Studio 2010 Ultimate".
Hmm, that Sublime actually looks pretty cool. Although it's commercial, while my combo of Visual Studio and Notepad++ is free (yay for being a teacher).
Re: Position of the star in a pointer declaration. Poll
Posted: Thu Sep 09, 2010 5:32 am
by toglia
Since we're all off topic here, theres something I would like to know.
Every now and then I here people talking about how cool is vim for coding but for me, someone with a visual studio background (now getting used to eclipse), vim looks like stone age. I have just downloaded it, without any cool plugins it must have, but my first impressions were pretty bad. I know every thing is done with the keyboard, and it has a lot of keywords for doing cool stuff, but still most programs have a ton of hotkeys too, I don't get it. So, can somebody explain to me why can somebody replace Vim for Eclipse for example... Does, it have everything Eclipse have? Or is it just for writing code. In that case isn't bad having to switch between applications to get everything one needs?
That sublime mini-map looks awesome, my memory is very visual and I'm sure I would find pieces of code much faster with that! It would be so nice to have it in Eclipse!
Re: Position of the star in a pointer declaration. Poll
Posted: Thu Sep 09, 2010 6:10 am
by mkultra333
I use
int *pName ;
But it's worth noting that my code is a cowboy anti-pattern from the darkest dimensions of Hell.
(Edit: Actually I usually go "int *pName=NULL ;")
Re: Position of the star in a pointer declaration. Poll
Posted: Thu Sep 09, 2010 8:07 am
by xavier
Klaim wrote:I don't care.
+1
Re: Position of the star in a pointer declaration. Poll
Posted: Thu Sep 09, 2010 5:35 pm
by CABAListic
@toglia: The strength of vim lies in text editing. Unfortunately I've found it somewhat difficult to explain, but the core to its strength is this: Where most standard text editors (including the integrated editor component in Visual Studio) basically focus on text insertion, i.e. whenever you type something, it will be inserted at the current cursor position, vim focusses on manipulation and navigation. vim's 'normal mode' does not let you enter text, instead everything you type will be interpreted as a vim command. If you type e.g. '53G', you will jump to line 53, typing '3d' will delete the next three lines from the cursor's position, etc.. There are several ways to go to the 'insert mode' where you actually insert text; a simple 'i' will start inserting before the cursor's position, 'I' will insert at the beginning of the line. Similar commands exist for inserting at the end or in a new line below or above the current one. Also you can start inserting by replacing existing text. For example, the command 'cib' will delete all text inside a pair of curly braces "(...)" and let you insert something else in there. And so on. It is really very handy, but you have to get used to it, and it takes a while.
One particular strong point that I really miss from many, many text editors is block selection. In vim you can select a block of text (i. e. 10 colums of 5 lines, instead of selecting the whole of the 5 lines), and then even insert something before or after the block which is immediately repeated for all lines in the block. Maybe you have had to do a task similar to this one: Given a list of some tokens (filenames or whatever),
which you copy-pasted from somewhere, and you need to transform then into a function call
There is more than one way to do this efficiently in vim, but one way is to select the tokens as a block and insert at the beginning: 'callSomeFunc(', and insert at the end ');', and vim will automatically repeat this for all the tokens in the block.
You can see that in action here:
http://www.youtube.com/watch?v=33oelVTGnAU
vim is not perfect, though. It is not a full IDE and even with some of the more advanced plugins it doesn't entirely feel like one, so you do miss out on some cool IDE features. In the end, for me personally I have found that I'm still more productive with vim than with the extra IDE features, but I'm not entirely satisfied. I guess this is why there exist vim plugins for a variety of IDEs; there's one for Visual Studio, but it's commercial. The quality of the plugins varies widely, one supposedly good one exists for netbeans, but I haven't tried that yet.
Re: Position of the star in a pointer declaration. Poll
Posted: Thu Sep 09, 2010 6:30 pm
by xavier
JustBoo wrote:xavier wrote:Klaim wrote:I don't care.
+1
Yeah, I know. I mean, it's all soooo beneath one to even glance and respond to such a silly poll. Someone who doesn't care would not even bother responding? Right? Right, got it.
+1 for the being so droll and "kewl" and junk.
Actually, the point *I* was trying to make is that the original poll makes the same mistake that many do -- no option for "no opinion either way". So, how else can anyone register this choice?
Re: Position of the star in a pointer declaration. Poll
Posted: Thu Sep 09, 2010 6:42 pm
by JaJDoo
xavier wrote:
... the point *I* was trying to make....
i see two stars in your post... that must be an encrypted message
Re: Position of the star in a pointer declaration. Poll
Posted: Thu Sep 09, 2010 6:50 pm
by xavier
JaJDoo wrote:xavier wrote:
... the point *I* was trying to make....
i see two stars in your post... that must be an encrypted message
I can't tell if you are trying to be an ass, trying to be funny (and failing) or simply picked me as the target of your projected anger today, but whatever the reason, I don't intend to come back to this thread, so if you persist, you'll be talking to yourself.
Re: Position of the star in a pointer declaration. Poll
Posted: Thu Sep 09, 2010 9:50 pm
by jacmoe
WTF?
Xavier, you should know by now that JaJDoo has a good sense of humour, even though it's twisted.

Re: Position of the star in a pointer declaration. Poll
Posted: Thu Sep 09, 2010 9:55 pm
by Kojack
I guess this is why there exist vim plugins for a variety of IDEs; there's one for Visual Studio, but it's commercial.
VsVim for Visual Studio 2010 is free and open source.
One particular strong point that I really miss from many, many text editors is block selection. In vim you can select a block of text (i. e. 10 colums of 5 lines, instead of selecting the whole of the 5 lines)
Both VS and Notepad++ let you do that using alt+drag mouse or alt+shift+move cursor.
They don't have the insert before/after each line feature you mentioned though. If I was doing what your example did, I'd put in the callSomeFunc(); first, duplicate the line as many times as needed (shift+alt+l to cut a line, then ctrl-v a few times to paste in copies), then block select the tokens, then paste within the brackets of the first callSomeFunc(). VS will past each line of the block into the brackets of the corresponding function.
Re: Position of the star in a pointer declaration. Poll
Posted: Thu Sep 09, 2010 10:07 pm
by scratchyrice
I always use
It just seems more "even" somehow haha
Re: Position of the star in a pointer declaration. Poll
Posted: Fri Sep 10, 2010 11:37 am
by JaJDoo
xavier wrote:JaJDoo wrote:xavier wrote:
... the point *I* was trying to make....
i see two stars in your post... that must be an encrypted message
I can't tell if you are trying to be an ass, trying to be funny (and failing) or simply picked me as the target of your projected anger today, but whatever the reason, I don't intend to come back to this thread, so if you persist, you'll be talking to yourself.
er... amm... im sorry...?
i was actually trying to ease the previous tension....
Re: Position of the star in a pointer declaration. Poll
Posted: Fri Sep 10, 2010 8:16 pm
by JaJDoo
JustBoo wrote:What tension? I know not this word you speak hu-man.

that smiley must be hinting something.....
Re: Position of the star in a pointer declaration. Poll
Posted: Sat Sep 11, 2010 4:57 pm
by toglia
Ups! I tried adding the options xavier said but I also restarted the poll...
