LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 08-14-2006, 06:27 PM   #1
judgex
LQ Newbie
 
Registered: Jan 2006
Location: Australia
Distribution: Fedora Core 4 and Cygwin
Posts: 14

Rep: Reputation: 0
Character under cursor in Vim 7.0.


I need a command that echoes the character under the cursor. Here is what I am using right now:
Code:
:execute "normal yl:echo \"\<c-r>\"\"\<cr>"
Is there a simpler way of doing this in Vim 7.0 or other version of Vim?

Thanks.
 
Old 08-14-2006, 08:06 PM   #2
judgex
LQ Newbie
 
Registered: Jan 2006
Location: Australia
Distribution: Fedora Core 4 and Cygwin
Posts: 14

Original Poster
Rep: Reputation: 0
Whoops I found this by accident.
Code:
:let c = getline(".")[col(".") - 1]
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide mouse cursor/change cursor location? mrjamin Linux - Software 4 09-27-2010 10:09 AM
Vim Cursor Color Mr_Munkey Linux - Software 0 01-06-2006 05:42 PM
Could not open default cursor font 'cursor' at startx with slackware 10.2 bgryderclock Slackware 3 01-02-2006 10:36 PM
[Mouse cursor] flicking on animated cursor Creak Debian 1 06-10-2005 02:16 AM
indentation character in vim rhoekstra Linux - General 0 02-17-2005 07:41 AM


All times are GMT -5. The time now is 08:39 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration