editing

More efficient movements editing python files in vim

那年仲夏 提交于 2019-11-29 19:51:43
Given a python file with the following repeated endlessly: def myFunction(a, b, c): if a: print b elif c: print 'hello' I'd like to move around and edit this file using familiar vim movements. For instance, using (, ), [[, ]], {, } or deleting/yanking/changing text using commands like di}. In other languages (like C++, Java, C#, etc) you've got curly brackets abound, so using a movement like di} can easily find a matching curly brace and act on that block. And in fact if I am on the 'b' character on the above text and do a di) in vim, it successfully deletes the text between the two parens.

UITableView delete button not appearing

江枫思渺然 提交于 2019-11-29 16:35:14
When I press the edit button I get the round delete icon to the left of the item. When I press the delete icon in the cell it 'turns' but the delete button does not show up so my commitEditingStyle never gets called because I have no delete button to press. Just for fun...I change the cell to Insert I get the plus icon...I press it and commitEditingStyle is called. I do not understand why I am not getting the delete button. I have a UIViewController that I am showing in a popover. I am adding a UITableView to like so... audioTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 44, self

How to read from a specific line from a text file in VHDL

江枫思渺然 提交于 2019-11-29 15:25:07
I am doing a program in VHDL to read and write data. My program has to read data from a line, process it, and then save the new value in the old position. My code is somewhat like: WRITE_FILE: process (CLK) variable VEC_LINE : line; file VEC_FILE : text is out "results"; begin if CLK='0' then write (VEC_LINE, OUT_DATA); writeline (VEC_FILE, VEC_LINE); end if; end process WRITE_FILE; If I want to read line 15, how can I specify that? Then I want to clear line 15 and have to write a new data there. The LINE is of access type, will it accept integer values? Russell's answer - using two files - is

Edit in Place CMS Suggestions [closed]

十年热恋 提交于 2019-11-29 15:20:26
I need to find a [very] easy to use (for editors/authors) CMS. Preferably with edit-in-place editing similar to SiteCore . We don't need something as huge and powerful as SiteCore though. Users need the ability to add pages (using set templates that we in development have provided), they also need the ability to add and editing content, with it being approved before publishing. Ideally we're looking for a .Net solution as our other web projects are .Net MVC - but PHP options are still ok. Many thanks. davivid I haven't looked at it for a while, but I thought Concrete5 had a lot of potential

problems with animation when deleting the last row of a TableView in ios7

一个人想着一个人 提交于 2019-11-29 03:55:43
I'm having some issues when deleting the last row of my (only) section in my tableView . Any other row works fine, but if I delete the row at the bottom of my tableView at any time (not just when its the last one left) the animation is very strange and laggy. It just doesn't look right. I've also noticed that changing the animation type doesn't do anything. The animation is always when the row slides up to the top and disappears. Changing it to UITableViewRowAnimationFade or another doesn't do anything. Here is my code //For the edit barButtonItem in my storyboard - (IBAction)editButtonPressed

edit text file using Python

大兔子大兔子 提交于 2019-11-28 20:56:53
I need to update a text file whenever my IP address changes, and then run a few commands from the shell afterwards. Create variable LASTKNOWN = "212.171.135.53" This is the ip address we have while writing this script. Get the current IP address. It will change on a daily basis. Create variable CURRENT for the new IP. Compare (as strings) CURRENT to LASTKNOWN If they are the same, exit() If they differ, A. "Copy" the old config file (/etc/ipf.conf) containing LASTKNOWN IP address into /tmp B. Replace LASTKNOWN with CURRENT in the /tmp/ipf.conf file. C. Using subprocess "mv /tmp/ipf.conf /etc

How do I edit the response of a form submission in Google Forms/Sheets?

时光怂恿深爱的人放手 提交于 2019-11-28 20:46:44
Recently, I've been conducting a survey. I began creating it in Excel Forms Online but switched to Google Forms after I realized several of its shortcomings. I hit a few snags but I thought I was all set to go. Unfortunately, I began adding questions to the form and changing responses (misspellings, etc...) and this began causing a whole bunch of problems. It's enough that I have to go back and ask users for their responses to new questions if applicable. What's worse is I can't modify a submission at all. I can't edit the spreadsheet connected to the form because results are stored in the

How to prevent Sublime Text 2 from swallowing closing brackets, quotes and parentheses?

青春壹個敷衍的年華 提交于 2019-11-28 16:11:44
问题 Sublime has this behaviour which is really annoying sometimes when you have to type in constructions with lots of brackets. When you type ( it adds () and puts the cursor in the middle, all fine, if you however will type ) it will silently swallow the closing bracket. This is really annoying when typing long regexps because the brackets gets unbalanced pretty quick and this is driving me crazy. So you end up with constructions like (([a-z]) . So the question is - is there a way to disable

More efficient movements editing python files in vim

ぃ、小莉子 提交于 2019-11-28 15:46:28
问题 Given a python file with the following repeated endlessly: def myFunction(a, b, c): if a: print b elif c: print 'hello' I'd like to move around and edit this file using familiar vim movements. For instance, using (, ), [[, ]], {, } or deleting/yanking/changing text using commands like di}. In other languages (like C++, Java, C#, etc) you've got curly brackets abound, so using a movement like di} can easily find a matching curly brace and act on that block. And in fact if I am on the 'b'

vim line numbers - how to have them on by default?

廉价感情. 提交于 2019-11-28 15:05:26
I can :set number from within a file I'm editing but how can I have them always be on by default? Tim Pote Add set number to your .vimrc file in your home directory. If the .vimrc file is not in your home directory create one with vim .vimrc and add the commands you want at open. Here's a site that explains the vimrc and how to use it. abe312 To change the default setting to display line numbers in vi/vim: vi ~/.vimrc then add the following line to the file: set number Either we can source ~/.vimrc or save and quit by :wq , now vim session will have numbering :) sagar mahajan Terminal > su >