[SOLVED] Setting "comments" option in vim.

Greetings.
I've run into issues with setting the "comments" option in vim 7.2. I'm trying to set it to "s:/*,m:**,ex:*/".
** Comments should be formated like this!
I've added the line "set comments=s:/*,m:**,ex:*/" to ~/.vimrc but it does not work and comments formatting reverts back to the default for the specific file extension. I suspect that this option gets overwritten from somewhere whitin vim's syntax files since setting the option for the active file works fine.
Any suggestions on how I can get it to work like I want to?
Last edited by msh (2009-01-24 20:14:50)

Solved by adding the below code to ~/.vimrc.
if !exists ("autocommands_loaded")
let autocommands_loaded = 1
autocmd FileType c set comments=s:/*,mb:**,ex:*/
endif

Similar Messages

  • (SOLVED)Disabling options in vim

    Is it possible to disable options in vim, for example "set number" from vims command line instead of from /etc/vimrc or ~/.vimrc.
    Last edited by unilx (2011-07-03 00:02:21)

    I'm not sure if it will help you, but
    set number
    nnoremap <F2> :set nonumber!<CR>
    sets the line numbers on by default and you can toggle it on/off by pressing F2.

  • [SOLVED] set columns in vim does not work

    I would like to set the window size of my vim to 95 when working with markdown files, so put
    set columns=95
    into an autosourced file when opening Markdown files. Unfortunately this has no effect and when I look at
    set columns?
    the window size is still 179 characters long.
    When I try to do
    set columns=95
    with vim already open, vim very shortly resizes the text/window, but after a second return to the original size which is 179 character (screen width)
    I tried ot figure out if it is a problem of my .vimrc by temporaliy working with a new empty .vimrc but the problem remains the same. I tried it out in another terminal emulator, but the problem remains the same. I tried it out logged in as root user before starting the XServer and here it worked as expected. So my gues is it has to do or with a X setting or with my window manager or with my shell.
    I am using i3, urxvt and zsh in the context where it didn't work and the Arch install default setting in the context where it works. Still I have no clue what causes the problem.
    Last edited by cutuchiqueno (2013-12-05 12:18:36)

    x33a wrote:I believe you'll need to float urxvt in i3 to do that.
    Thanks, I haven't thought of that possibility and it works. Although what I wanted to achieve is not possible with this solution though I found the Vimroom plugin which did the job, so thanks again.

  • [SOLVED] What is wrong with VIM?

    I am using Vim 7.2.411 and none of the commands work except saving files. Ex:
    I can do:
    :w file.c
    or
    Shift+ZZ
    However, none of the other commands work. For example, I can't even enter insert mode (i). I have tried reinstalling to no prevail. This isn't an urgent problem (for me at least), I just want to know what the hell is wrong with it so I can get back to coding
    Last edited by itsbrad212 (2010-05-11 20:39:23)

    Solved
    I copied the contents of /var/abs/testing/vim/vimrc:
    " All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
    " /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
    " you can find below. If you wish to change any of those settings, you should
    " do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
    " everytime an upgrade of the vim packages is performed. It is recommended to
    " make changes after sourcing archlinux.vim since it alters the value of the
    " 'compatible' option.
    " This line should not be removed as it ensures that various options are
    " properly set to work with the Vim-related packages.
    runtime! archlinux.vim
    " If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim'
    " Or better yet, read /usr/share/vim/vim72/vimrc_example.vim or the vim manual
    " and configure vim to your own liking!
    to a new file I created (/etc/vimrc)

  • I noticed when I restart Firefox 4, it opens my previous tabs even I set the option "Open a blank page" and it opens blank page when I have "Show my windows and tabs from last time". Please ignore my question if you're already aware of this issue. Thanks.

    I noticed when I restart Firefox 4, it opens my previous tabs even I set the option "Open a blank page" and it opens blank page when I have "Show my windows and tabs from last time". Please ignore my question if you're already aware of this issue. Thanks.

    Your previous tabs will not re-open or be available to re-open when starting Firefox if:
    *your previous session was in Private Browsing mode; see --> http://support.mozilla.org/en-US/kb/Private+Browsing
    *you use Clear Recent History (''Firefox button > History > Clear Recent History'' or ''Tools > Clear Recent History''); see --> https://support.mozilla.org/en-US/kb/Clear%20Recent%20History#w_how-do-i-clear-my-history
    *you clear History automatically when closing Firefox; see --> https://support.mozilla.org/en-US/kb/Clear%20Recent%20History#w_how-do-i-make-firefox-clear-my-history-automatically
    NOTE: Your third-party Plugins (Add-ons > Plugins) are not in the "Application Basics" (Troubleshooting Information) in the "More system details" of your original post. Third-party Plugins are categorized separately in "Installed Plugins" under "More system details". You should review but not change the Plugins as detected automatically by the software on this forum when posting a question.
    If you problem still exists after checking the above, the problem could be caused by one or more of your Extensions or Plugins:
    *See --> [http://support.mozilla.org/en-US/kb/Troubleshooting+extensions+and+themes Troubleshooting extensions and themes]
    *See --> [http://support.mozilla.org/en-US/kb/Troubleshooting+plugins Troubleshooting plugins]
    *See --> [http://support.mozilla.org/en-US/kb/Basic+Troubleshooting Basic Troubleshooting]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • Setting database option ONLINE to ON for database "dbname"

    Hi
    Today i faced a wiered issue, One of my database on sql  server 2005 was offline.
    Scenerio: One fo my database was offline , I checked in
    1. SSMS (GUI) -- DB is offline
    2. sys.databases  (status) -- offline
    3. Job is using DATABASEPROPERTYEX and its ignoring databases as status is offline.
    And we also know (observed) if we change status from online to offline , Message come as below
    Setting database option OFFLINE to ON for database "dbname".
    SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Object Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
    SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'SQL Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
    SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Bound Trees' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
    And when we change from offline to online , message is like
    Setting database option ONLINE to ON for database "dbname".
    Issue : Now When i change database status from offline to online (online to on), below message generated. This only happen once and i am not able to regenerate same
    Setting database option ONLINE to ON for database "dbname".
    SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Object Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
    SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'SQL Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
    SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Bound Trees' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
    Confusion: Why cache stores are flushed while taking database online ??
    Thanks Saurabh Sinha http://saurabhsinhainblogs.blogspot.in/ Please click the Mark as answer button and vote as helpful if this reply solves your problem

    This message was introduced in SP2. From online help about ALTER DATABASE athttp://msdn2.microsoft.com/en-us/library/ms174269.aspx
    When the database is set to
    AUTOCLOSE = ON, an operation that initiates an automatic database shutdown clears the plan cache for the instance of SQL Server.
    Can you check the above?
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • [SOLVED] Set keyboard property through the console

    Hi,
    in the GNOME Keyboard properties, there is the option "Key presses repeat when key is held down" option. How can I set this option without GNOME, Any Xorg pros here that can help me? Maybe with setxkbmap? But I don't see what option I must use there. Or do I need a xorg.conf setting? I've read all the man pages.
    Why do I need this? I have a game running on a seperate XServer in wine that only works properly when that setting is disabled.
    Thanks
    /Edit: Solved! xset r on/off does the trick.
    Last edited by scrawl (2010-02-06 20:21:40)

    Hello Rumenigue,
    It looks to me like you are using a console cable.  The reason you usually see them the other way around is because with a console cable the RJ-45 end goes into the device (an ethernet jack labeled console) whereas on this switch the console port is serial itself. 
    Usually the serial end of the cable you have plugs into a USB to serial adapter (because most computers today don't have serial ports anymore) and that USB connection goes into your PC, creating the virtual COM port you need in HyperTerminal.
    So if you get a USB to Serial adapter you could plug that from USB to the console port, or if you computer has a serial port of its own just connect a serial cable directly from the PC to the switch, then use HyperTerminal with the settings recommended above by Tom.
    Hope I have helped,
    Christopher Ebert
    Network Support Engineer - Cisco Small Business Support Center

  • How to set print option for a Billing document using T-code VF02

    Hi All,
    Please suggest me the way to set print option for a Billing document for T-code VF02 and please let me know how to get print preview for any particular Billing document?
    regards
    Anand.

    Enter the billing documents detail
    Goto Goto> Header>Output.
    Check the status for your output type in this screen.
    If it is green then come back to the VF03 screen.Enter the billing document number.
    Click on Billing document-->Issue output to.
    Press (CtrlShiftF1) or click on the icon beside "Print options".
    Here you can see the print preview.
    If the status is red then click on the processing log.Here you will get the error messages.
    If the status is in yellow colour,then click on the "Further Data" button
    Set "Dispatch time" as "4 Send immediately (when saving the application)"
    Before the print preview option you should make sure you have added correct output type to the relevant billing document. To do that, go to transaction VF02.
    Enter the billing document no
    Go to Menu option -> Go to -> Header -> Output
    In that screen you have to add relevant output type. (Standard output type is RD00)
    Add that & press enter key
    Highlight that line & press "Further Data" button
    Set "Dispatch time" as "4 Send immediately (when saving the application)"
    Press "Back" Button
    again select that line & go to "Communication method" button
    Set "Logical destination" as LOCAL"
    Don't mark "Print immediately" & "Release after output" ticks. If you mark them, sa soon as you save the billing document, you'll get a print out.
    Press "Back" Button
    Save
    Now form the initial "Change Billing Document" screen, Go to Menu option; Billing Document -> Issue Output to
    You can see that output type line appear.
    select that line & press "Print Preview" button or (CTRLSHIFTF1)
    You can see the print preview.
    Alternatively you can use VF31 to print multiple print outs at same time.
    If you want to get PDF outputs of billing documents, go to your printer settings in the your computer from Control Panel.
    Set PDF Writer as "Default Printer" (Right click & select "Set as Default Printer")
    Then normal way, print the billing from SAP.
    It'll automatically send to your PDF writer. You can save it to the path you want,

  • I need to pin the comment options in the tool bar. Please Adobe team put that option.

    I need to pin the comments options in the tool bar.  Please Adobe team put that option.
    https://www.pinterest.com/pin/create/extension/

    Thank you!!

  • How to Set Polling Options of a DB adapter From EnterpriseManager/AdminCons

    HI All,
    We all know after Dragging a DB adapeter we can manually set the polling Options in J developer
    However,
    My query is how to Set Polling Options of a DB adapter From EnterpriseManager/AdminCons so that we dun hav to change our code and redeploy if any change is asked for.
    My DB adapter is deployed to EM.(SOA Server).
    Polling Options are like:
    From the Polling Frequency list, select how frequently to poll for new records or events.
    In the Database Rows per XML Document field, specify the number of rows per XML document when sending events to Oracle BPEL PM or Mediator. This is the batch setting between the database adapter and its consumer: Oracle BPEL PM or Mediator.
    In the Database Rows per Transaction field, select Unlimited or enter a value to indicate the number of table rows to process during a single transaction.
    When polling the database for events, you can order the returned rows by the selected column by using the Order By list. The best practice is to choose <No Ordering>, as message ordering regardless is not guaranteed without extra configuration.

    Hi,
    Inside your composite (in the EM), you can see there is a category table call 'Services and References'.
    Under it, find the name of your JCA Adapter, where you've define the polling from the DB. Click on it and go to the property tab.
    There you can find all the parameters you've set and more.
    After you finish update it, click on Apply (this will automatically poll the data).
    Arik

  • HT4623 I have an ipad 2 on ops 4.3 and have just updated to 7.1 via itunes. I backed up first and have synced repeatedly but keep getting a message on my ipdad screen that the ipad is not set up - I chose the set up option restore from itunes back up

    I have an ipad 2 on ops 4.3 and have just updated to 7.1 via itunes. I backed up first and have synced repeatedly but keep getting a message on my ipdad screen that the ipad is not set up - I chose the set up option restore from itunes back up

    To free up hard drive space the best bet is to move data files that you don't need access to all the time. Likely candidates are music, video, and photos. Things like word processing and spreadsheet files can also be moved but they tend not to be very large and so don't free up much space. The problem with moving the above mentioned files is that iTunes and iPhoto need to know where the files are stored.
    Here's an article explaining how to move the iTunes folder. You can move the iPhoto library using the Finder but there is a slight complication. Start iPhoto, open the Preferences and click on the Advanced tab. The first option is "Copy items to the iPhoto Library". If this option is checked, copy the iPhoto library to your external folder (drag it from the Pictures folder to your external drive) and then delete it from your Picture folder. If this option is not checked, it is a bit more complicated and we'll need to talk a bit.

  • Print Comments Option Missing in Adobe Reader 9.4.0

    Using a PDF I downloaded online, I inserted comments using both Adobe Acrobat Pro and Nuance PDF Converter Pro.
    In both the Acrobat and Nuance applications I can print the PDF with the comments just fine.
    When I opened the document in Adobe Reader 9.4.0 it would not print the comments by default.
    I hunted around the File > Print & Edit > Preferences dialog boxes but found no such option in Reader 9.4.  It either does not exist, or I'm not looking in the proper place(s).
    I opened the same document in Adobe Reader X and I did have the option to print the comments as outlined in the instructions here (http://kb2.adobe.com/cps/897/cpsid_89733.html).
    On that same page however it says a comment printing options should be on both the Edit > Preferences and File > Print dialog boxed in Reader 9 but it is not.  The instructions above appear to be inaccurate.
    I've tested this on multiple systems (same base OS & configuration) but the problem persists:  How does one print comments in Adobe Reader 9.4.0?  (Upgrading is not an option at this time.)

    Thanks for the speedy response!
    The repair didn't appear to do the trick.  The Comments option under Edit > Preferences is still missing and even with the Document and Markup option still selected, it doesn't actually print comments.I took it a step further & removed it completely then re-installed it but that didn't help.
    I am part of the IT organization .  So you're suggesting (or saying) there's a certain Adobe Reader 9.4 update that introduces this feature?  If so, do we know which specific update?  Is there a KB article, release note or change log that that covers/discusses this?

  • Trying to print comments but 'Commenting' option doesn't appear in Preferences in Adobe. Using Mac OSX.6.8

    Hi all
    I need to print off some student work in PDF form showing the comments they have added BUT when I go to the "preference" menu in Adobe, the "Commenting" option just isn't there! Any idea why? Any way round it? I'm on a Mac using OS10.6.8, Adobe version 9.3.2.
    Thanks
    Nigel

    Sorry – new to this. I just have Adobe Reader, version 9.3.2. The site I looked for help from was an Acrobat Help site. It directed me to the Preferences menu and referred to (and showed) a "Commenting" option which just isn't there on my screen. The page is here:
    http://helpx.adobe.com/acrobat/kb/print-comments-acrobat-reader.html
    Cheers
    Nigel
    Professor Nigel King
    Acting Associate Dean for Research
    Co-Director, Institute for Research in Citizenship and the Applied Human Sciences
    School of Human and Health Sciences
    University of Huddersfield
    : +44 (0) 1484 472812

  • How to enable the comment option in the pdf file

    Hi,
    How to enable the comment option in the pdf file using acrobat sdk[IAC, javascript],
    Give me idea on this to automate.
    If not leave it.
    Regards,
    jkrishnanvenkat

    jkrishnanvenkat,
    I can also do this from Acrobat Pro. Click Comments - Enable for Commentingand Analysis in Adobe Reader. This can not be done through the DSK or JavaScript.
    Gregory

  • How does one set the option to pre-compile JSPs on deployment in WL 10.3?

    Outside of manually creating and modifying weblogic.xml, that is.
    There used to be a tool Weblogic Builder that gave a graphical interface to modify weblogic.xml. Has this been replaced in 10.3 or just thrown away?
    Also, can I set the option at all in an app deployed as a war without exploding the war manually.
    Thanks.
    Edited by: joeb on Jan 29, 2009 5:26 PM

    You might be able to do this with a deployment plan. If doing this requires adding an element, as opposed to simply modifying the value of an element, then it might not help.
    It would be conceivable to add this capability as part of a build process, as you can use the "xmltask" Ant task library, to automatically modify the file. You'd also have to add in tasks that automatically exploded and reconstruct the WAR file. At least you wouldn't have to do this manually.
    I doubt there's any way to change this in an already deployed app, without redeploying the app.

Maybe you are looking for

  • LaserJet 2605dn won't print in color

    System running Win7-64bit, driver is Univ PCL6 v5. Have tried to print from Outlook, Word, IE, Paint and only get greyscale. Have checked the styles in Outlook and not checked for grey. Also have a Photosmart C7280 and it prints in color fine. Both a

  • Can't activate Photoshop on new MacBook Pro

    Program Version: Photoshop Elements 8. I just purchased a new MacBook Pro today to replace my three year old MacBook. I sold my old MacBook after I backed it up onto an external hard disk via Time Machine. I have used migration assistant to import ev

  • MSMQ Errors in log

    I have W2K8R2 cluster. MSMQ is not a resource within any of the groups. Any idea why I'm seeing these errors in the log? WARN  [RCM] Failed to load restype 'MSMQ': error 21. WARN  [RCM] rcm::RcmApi::ResTypeControl: ResType MSMQ's DLL is not present o

  • Deadline Facility

    Hi, I am absolutely new to this DEADLINE feature. We have a requirement of sending an EMail initmation for every 5 minutes till the WORKITEM is executed. Is this possible? Can anyone help me out. Regards, Raja Sekhar

  • Problem storing a secure key on the filesystem

    Hello. I have made a key, and stored this in the file system. But it is not secure. I have example code of doing this using password with salt and iterations. But the problem is that I get Illegial key size. Can someone please paste code on how you c